spi: update modalias_show after of_device_uevent_modalias support
PATCH 1/1 spi: update modalias_show after of_device_uevent_modalias support
Commit 3ce6c9e2617e ("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 3ce6c9e2617e ("spi: add of_device_uevent_modalias support")
Signed-off-by Andreas Schwab <[email protected]>
--- drivers/spi/spi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/spi/spi.c +4 -0
@@ -58,6 +58,10 @@ modalias_show(struct device *dev, struct device_attribute *a, char *buf)const struct spi_device *spi =to_spi_device (dev);int len; + len =of_device_modalias (dev, buf,PAGE_SIZE ); +if (len != -ENODEV ) +return len; + len =acpi_device_modalias (dev, buf,PAGE_SIZE -1 );if (len != -ENODEV )return len;
Signature · 7 lines
2.32.0 -- Andreas Schwab, SUSE Labs, [email protected] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."