Commit cf9eb39c authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Mark Brown

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: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent d0e639c9
...@@ -1025,7 +1025,7 @@ static acpi_status acpi_spi_add_device(acpi_handle handle, u32 level, ...@@ -1025,7 +1025,7 @@ static acpi_status acpi_spi_add_device(acpi_handle handle, u32 level,
return AE_OK; 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)) { if (spi_add_device(spi)) {
dev_err(&master->dev, "failed to add SPI device %s from ACPI\n", dev_err(&master->dev, "failed to add SPI device %s from ACPI\n",
dev_name(&adev->dev)); dev_name(&adev->dev));
......
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