summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2013-10-10 17:19:17 +0300
committerMark Brown <broonie@linaro.org>2013-10-10 19:15:47 +0100
commitcf9eb39c6f7b42fdf9aa6f1af28780b2522a847a (patch)
tree457369cdc7b5c0e12a920f096fef0f7d686bc427 /drivers/spi
parentd0e639c9e06d44e713170031fe05fb60ebe680af (diff)
downloadlinux-cf9eb39c6f7b42fdf9aa6f1af28780b2522a847a.tar.bz2
spi: Fix modalias for ACPI enumerated SPI devices
There is a minor fault about ACPI enumerated SPI devices with their modalias attribute. Now modalias is set by device instance not by hardware ID. For example "spi:INTABCD:00", "spi:INTABCD:01" etc. This means each device instance gets different modalias which does match with generated modules.alias. Currently this is not problem as matching can happen also with "acpi:INTABCD" modalias. Fix this by using ACPI hardware ID. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 9e039c60c068..e57e9acd75cb 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1025,7 +1025,7 @@ static acpi_status acpi_spi_add_device(acpi_handle handle, u32 level,
return AE_OK;
}
- strlcpy(spi->modalias, dev_name(&adev->dev), sizeof(spi->modalias));
+ strlcpy(spi->modalias, acpi_device_hid(adev), sizeof(spi->modalias));
if (spi_add_device(spi)) {
dev_err(&master->dev, "failed to add SPI device %s from ACPI\n",
dev_name(&adev->dev));