linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices
@ 2013-10-10 14:17 Jarkko Nikula
       [not found] ` <1381414669-26115-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: Jarkko Nikula @ 2013-10-10 14:17 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-acpi, Wolfram Sang, Jarkko Nikula, Mika Westerberg

There is a minor fault about ACPI enumerated I2C devices with their modalias
attribute. Now modalias is set by device instance not by hardware ID.
For example "i2c:INTABCD:00", "i2c: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/i2c/i2c-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 29d3f04..6dd0c53 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1111,7 +1111,7 @@ static acpi_status acpi_i2c_add_device(acpi_handle handle, u32 level,
 	if (ret < 0 || !info.addr)
 		return AE_OK;
 
-	strlcpy(info.type, dev_name(&adev->dev), sizeof(info.type));
+	strlcpy(info.type, acpi_device_hid(adev), sizeof(info.type));
 	if (!i2c_new_device(adapter, &info)) {
 		dev_err(&adapter->dev,
 			"failed to add I2C device %s from ACPI\n",
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2013-10-16  7:16 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-10 14:17 [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices Jarkko Nikula
     [not found] ` <1381414669-26115-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-11 14:49   ` Mika Westerberg
     [not found]     ` <20131011144946.GS3521-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-10-11 22:16       ` Rafael J. Wysocki
2013-10-12  5:04         ` Mika Westerberg
     [not found]           ` <20131012050413.GY3521-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-10-12 13:45             ` Rafael J. Wysocki
     [not found]               ` <2878883.SYGmCkS5Bt-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-10-12 16:18                 ` Mika Westerberg
2013-10-14  6:45                   ` Jarkko Nikula
     [not found]                     ` <525B9321.5000906-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-14  8:16                       ` Mika Westerberg
2013-10-14  6:34           ` Jarkko Nikula
2013-10-14  8:13             ` Mika Westerberg
2013-10-14  9:23   ` Zhang Rui
2013-10-14 11:18     ` Jarkko Nikula
2013-10-14 12:47       ` Zhang Rui
2013-10-15 11:44         ` Zhang Rui
2013-10-15 20:37           ` Rafael J. Wysocki
     [not found]             ` <12043671.FjbAvIiH5B-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-10-15 20:48               ` Greg Kroah-Hartman
2013-10-15 21:24                 ` Rafael J. Wysocki
2013-10-15 23:31                   ` Greg Kroah-Hartman
2013-10-15 23:47                     ` Rafael J. Wysocki
2013-10-16  0:04                       ` Grant Likely
     [not found]                         ` <CACxGe6v3JHLKHqBXux=1mgm227S2dLafaqohKvzqsw1uo6tHyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-16  0:10                           ` Greg Kroah-Hartman
2013-10-16  7:16                         ` Jarkko Nikula
     [not found]                 ` <20131015204829.GA5212-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-10-15 21:40                   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).