* [PATCH] i2c: core: Make comment about I2C table requirement to reflect the code
@ 2017-08-09 9:21 Javier Martinez Canillas
2017-08-14 19:34 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Javier Martinez Canillas @ 2017-08-09 9:21 UTC (permalink / raw)
To: linux-kernel; +Cc: Javier Martinez Canillas, Wolfram Sang, linux-i2c
I2C drivers were required to have an I2C device ID table even if were for
devices that would only be registered using a specific firmware interface
(e.g: OF or ACPI).
But commit da10c06a044b ("i2c: Make I2C ID tables non-mandatory for DT'ed
devices") changed the I2C core to relax the requirement and allow drivers
to avoid defining this table.
Unfortunately it only took into account drivers for OF-only devices and
forgot about ACPI-only ones, and this was fixed by commit c64ffff7a9d1
("i2c: core: Allow empty id_table in ACPI case as well").
But the latter didn't update the original comment, so it doesn't reflect
what the code does now.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/i2c/i2c-core-base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 12822a4b8f8f..56e46581b84b 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -353,8 +353,8 @@ static int i2c_device_probe(struct device *dev)
}
/*
- * An I2C ID table is not mandatory, if and only if, a suitable Device
- * Tree match table entry is supplied for the probing device.
+ * An I2C ID table is not mandatory, if and only if, a suitable OF
+ * or ACPI ID table is supplied for the probing device.
*/
if (!driver->id_table &&
!i2c_acpi_match_device(dev->driver->acpi_match_table, client) &&
--
2.13.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: core: Make comment about I2C table requirement to reflect the code
2017-08-09 9:21 [PATCH] i2c: core: Make comment about I2C table requirement to reflect the code Javier Martinez Canillas
@ 2017-08-14 19:34 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2017-08-14 19:34 UTC (permalink / raw)
To: Javier Martinez Canillas; +Cc: linux-kernel, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 868 bytes --]
On Wed, Aug 09, 2017 at 11:21:28AM +0200, Javier Martinez Canillas wrote:
> I2C drivers were required to have an I2C device ID table even if were for
> devices that would only be registered using a specific firmware interface
> (e.g: OF or ACPI).
>
> But commit da10c06a044b ("i2c: Make I2C ID tables non-mandatory for DT'ed
> devices") changed the I2C core to relax the requirement and allow drivers
> to avoid defining this table.
>
> Unfortunately it only took into account drivers for OF-only devices and
> forgot about ACPI-only ones, and this was fixed by commit c64ffff7a9d1
> ("i2c: core: Allow empty id_table in ACPI case as well").
>
> But the latter didn't update the original comment, so it doesn't reflect
> what the code does now.
>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-14 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-09 9:21 [PATCH] i2c: core: Make comment about I2C table requirement to reflect the code Javier Martinez Canillas
2017-08-14 19:34 ` Wolfram Sang
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).