Skip to content

Commit e09f2ab

Browse files
andreas-schwabbroonie
authored andcommitted
spi: update modalias_show after of_device_uevent_modalias support
Commit 3ce6c9e ("spi: add of_device_uevent_modalias support") is incomplete, as it didn't update the modalias_show function to generate the of: modalias string if available. Fixes: 3ce6c9e ("spi: add of_device_uevent_modalias support") Signed-off-by: Andreas Schwab <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 8311ee2 commit e09f2ab

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
@@ -58,6 +58,10 @@ modalias_show(struct device *dev, struct device_attribute *a, char *buf)
5858
const struct spi_device *spi = to_spi_device(dev);
5959
int len;
6060

61+
len = of_device_modalias(dev, buf, PAGE_SIZE);
62+
if (len != -ENODEV)
63+
return len;
64+
6165
len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1);
6266
if (len != -ENODEV)
6367
return len;

0 commit comments

Comments
 (0)