提交 f4b17a14 编写于 作者: J Javier Martinez Canillas 提交者: Wolfram Sang

i2c: core: Make comment about I2C table requirement to reflect the code

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 da10c06a ("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 c64ffff7
("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: NJavier Martinez Canillas <javierm@redhat.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 4e2d93de
......@@ -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) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册