From: Grant Likely Date: Sun, 20 May 2012 06:08:13 +0000 (-0600) Subject: spi: Add "spi:" prefix to modalias attribute of spi devices X-Git-Tag: v3.6-rc1~96^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8e328b3bd65fdefc9c49a27ee80c28e0a44b653;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Signed-off-by: Grant Likely --- 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[] = {