public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: update modalias_show after of_device_uevent_modalias support
@ 2021-07-22 17:07 Andreas Schwab
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2021-07-22 17:07 UTC (permalink / raw)
  To: Marco Felsch; +Cc: broonie, linux-spi, kernel, linux-kernel

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>
---
 drivers/spi/spi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index c99181165321..e4dc593b1f32 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;
-- 
2.32.0


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply related	[flat|nested] 4+ messages in thread
[parent not found: <20210525091003.18228-1-m.felsch@pengutronix.de>]

end of thread, other threads:[~2021-07-22 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-22 17:07 [PATCH] spi: update modalias_show after of_device_uevent_modalias support Andreas Schwab
     [not found] <20210525091003.18228-1-m.felsch@pengutronix.de>
2021-07-22 13:48 ` Andreas Schwab
2021-07-22 14:06   ` Mark Brown
2021-07-22 17:09   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox