Commit e09f2ab8 authored by Andreas Schwab's avatar Andreas Schwab Committed by Mark Brown

spi: update modalias_show after of_device_uevent_modalias support

Commit 3ce6c9e2 ("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: 3ce6c9e2 ("spi: add of_device_uevent_modalias support")
Signed-off-by: default avatarAndreas Schwab <schwab@suse.de>
Link: https://lore.kernel.org/r/mvmwnpi4fya.fsf@suse.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8311ee21
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment