Commit d8e328b3 authored by Grant Likely's avatar Grant Likely

spi: Add "spi:" prefix to modalias attribute of spi devices

The modalias attribute of spi devices doesn't have the "spi:" prefix
that is used in the UEVENT and in spi device drivers.  This patch adds
the prefix so the modprobe can correctly match modules to devices.
Reported-by: default avatarDavid Daney <david.daney@cavium.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 1e8a52e1
...@@ -53,7 +53,7 @@ modalias_show(struct device *dev, struct device_attribute *a, char *buf) ...@@ -53,7 +53,7 @@ modalias_show(struct device *dev, struct device_attribute *a, char *buf)
{ {
const struct spi_device *spi = to_spi_device(dev); const struct spi_device *spi = to_spi_device(dev);
return sprintf(buf, "%s\n", spi->modalias); return sprintf(buf, "%s%s\n", SPI_MODULE_PREFIX, spi->modalias);
} }
static struct device_attribute spi_dev_attrs[] = { static struct device_attribute spi_dev_attrs[] = {
......
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