Skip to content

Commit

Permalink
spi: Add "spi:" prefix to modalias attribute of spi devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Grant Likely committed May 21, 2012
1 parent 1e8a52e commit d8e328b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit d8e328b

Please sign in to comment.