@@ -6,6 +6,8 @@
#define DEFAULT_BANK_SWITCH_TIMEOUT 3000
+int sdw_uevent(struct device *dev, struct kobj_uevent_env *env);
+
#if IS_ENABLED(CONFIG_ACPI)
int sdw_acpi_find_slaves(struct sdw_bus *bus);
#else
@@ -47,7 +47,7 @@ int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size)
slave->id.mfg_id, slave->id.part_id);
}
-static int sdw_uevent(struct device *dev, struct kobj_uevent_env *env)
+int sdw_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct sdw_slave *slave;
char modalias[32];
@@ -71,7 +71,6 @@ static int sdw_uevent(struct device *dev, struct kobj_uevent_env *env)
struct bus_type sdw_bus_type = {
.name = "soundwire",
.match = sdw_bus_match,
- .uevent = sdw_uevent,
};
EXPORT_SYMBOL_GPL(sdw_bus_type);
@@ -17,6 +17,7 @@ static void sdw_slave_release(struct device *dev)
struct device_type sdw_slave_type = {
.name = "sdw_slave",
.release = sdw_slave_release,
+ .uevent = sdw_uevent,
};
static int sdw_slave_add(struct sdw_bus *bus,
Currently the code deals with uevents at the bus level, but we only care for Slave events Suggested-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> --- drivers/soundwire/bus.h | 2 ++ drivers/soundwire/bus_type.c | 3 +-- drivers/soundwire/slave.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)