diff --git a/drivers/soundwire/Makefile b/drivers/soundwire/Makefile
index 76a5c52b12b4..5bad8422887e 100644
--- a/drivers/soundwire/Makefile
+++ b/drivers/soundwire/Makefile
@@ -7,9 +7,11 @@ ccflags-y += -DDEBUG
#Bus Objs
soundwire-bus-objs := bus_type.o bus.o master.o slave.o mipi_disco.o
stream.o
obj-$(CONFIG_SOUNDWIRE) += soundwire-bus.o
+ccflags-$(CONFIG_SOUNDWIRE) += -DDEFAULT_SYMBOL_NAMESPACE=SDW_CORE
soundwire-generic-allocation-objs := generic_bandwidth_allocation.o
obj-$(CONFIG_SOUNDWIRE_GENERIC_ALLOCATION) +=
soundwire-generic-allocation.o
+ccflags-$(CONFIG_SOUNDWIRE_GENERIC_ALLOCATION) +=
-DDEFAULT_SYMBOL_NAMESPACE=SDW_CORE
Don't use ccflags, just use the correct MODULE_EXPORT_NS() tag instead.
The documentation [1] states
"
Defining namespaces for all symbols of a subsystem can be very verbose and
may become hard to maintain. Therefore a default define
(DEFAULT_SYMBOL_NAMESPACE) is been provided, that, if set, will become the
default for all EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL() macro expansions
that do not specify a namespace.
"
If the ccflags option is not supported or no longer desired, it'd be worth
updating the documentation for dummies like me. I took the wording as a hint
to avoid using MODULE_EXPORT_NS.
It's supported, and works just fine. It's just that you really don't
have a ton of exports, right? What's wrong with manually marking them?
And "SDW_CORE" is odd, "SOUNDWIRE" instead?
'sdw' is the prefix used everywhere for SoundWire symbols.
Ok, I guess that ship has sailed :(