* [PATCH] spi: Fix modalias for ACPI enumerated SPI devices
@ 2013-10-10 14:19 Jarkko Nikula
2013-10-10 18:16 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jarkko Nikula @ 2013-10-10 14:19 UTC (permalink / raw)
To: linux-spi; +Cc: linux-acpi, Mark Brown, Jarkko Nikula, Mika Westerberg
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>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
---
Generated on top of v3.12-rc4-29-g0e7a3ed.
---
drivers/spi/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 9e039c6..e57e9ac 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));
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: Fix modalias for ACPI enumerated SPI devices
2013-10-10 14:19 [PATCH] spi: Fix modalias for ACPI enumerated SPI devices Jarkko Nikula
@ 2013-10-10 18:16 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-10-10 18:16 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-spi, linux-acpi, Mika Westerberg
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
On Thu, Oct 10, 2013 at 05:19:17PM +0300, Jarkko Nikula wrote:
> 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.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-10 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-10 14:19 [PATCH] spi: Fix modalias for ACPI enumerated SPI devices Jarkko Nikula
2013-10-10 18:16 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox