diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-05-20 00:08:13 -0600 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-05-20 20:14:48 -0600 |
commit | d8e328b3bd65fdefc9c49a27ee80c28e0a44b653 (patch) | |
tree | 2e84c82115893477753dabb4d882b50aa46815d9 | |
parent | 1e8a52e18cfb381bc9cc1f0b720540364d2a6edd (diff) | |
download | op-kernel-dev-d8e328b3bd65fdefc9c49a27ee80c28e0a44b653.zip op-kernel-dev-d8e328b3bd65fdefc9c49a27ee80c28e0a44b653.tar.gz |
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: David Daney <david.daney@cavium.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 1041cb8..84c2861 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -53,7 +53,7 @@ modalias_show(struct device *dev, struct device_attribute *a, char *buf) { 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[] = { |