aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2021-07-22 15:48:45 +0200
committerMark Brown <broonie@kernel.org>2021-07-22 16:02:23 +0100
commite09f2ab8eecc6dcbd7013a1303cbe56b00dc9fb0 (patch)
tree12ac6a1e8f74bc780d528c44a46188a03a20b778 /drivers/spi
parentspi: meson-spicc: fix memory leak in meson_spicc_remove (diff)
downloadlinux-dev-e09f2ab8eecc6dcbd7013a1303cbe56b00dc9fb0.tar.xz
linux-dev-e09f2ab8eecc6dcbd7013a1303cbe56b00dc9fb0.zip
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 <schwab@suse.de> Link: https://lore.kernel.org/r/mvmwnpi4fya.fsf@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 35928d0843d9..397dd2959bfd 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -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;