Skip to content

Commit 3ce6c9e

Browse files
Marco Felschbroonie
authored andcommitted
spi: add of_device_uevent_modalias support
Add OF support as already done for ACPI to take driver MODULE_DEVICE_TABLE(of, ..) into account. For example with this change a spi nor device MODALIAS changes from: MODALIAS=spi:spi-nor to MODALIAS=of:Nspi-flashT(null)Cjedec,spi-nor Signed-off-by: Marco Felsch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b2d501c commit 3ce6c9e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/spi/spi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ static int spi_uevent(struct device *dev, struct kobj_uevent_env *env)
363363
const struct spi_device *spi = to_spi_device(dev);
364364
int rc;
365365

366+
rc = of_device_uevent_modalias(dev, env);
367+
if (rc != -ENODEV)
368+
return rc;
369+
366370
rc = acpi_device_uevent_modalias(dev, env);
367371
if (rc != -ENODEV)
368372
return rc;

0 commit comments

Comments
 (0)