summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core-base.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-08-21 20:03:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-03 11:26:55 +0200
commit883ed72723ef8809c54a63c114b453d97b14ca41 (patch)
tree768825cd3000ddd4deeb479920a9a2e5d7e29a46 /drivers/i2c/i2c-core-base.c
parent2fc8fa50ebeebeb42c5e4fb7655ec3a1296f262f (diff)
downloadlinux-stable-883ed72723ef8809c54a63c114b453d97b14ca41.tar.gz
linux-stable-883ed72723ef8809c54a63c114b453d97b14ca41.tar.bz2
linux-stable-883ed72723ef8809c54a63c114b453d97b14ca41.zip
i2c: core: Don't fail PRP0001 enumeration when no ID table exist
[ Upstream commit e3cb82c6d6f6c27ab754e13ae29bdd6b949982e2 ] When commit c64ffff7a9d1 ("i2c: core: Allow empty id_table in ACPI case as well") fixed the enumeration of I²C devices on ACPI enabled platforms when driver has no ID table, it missed the PRP0001 support. i2c_device_match() and i2c_acpi_match_device() differently match driver against given device. Use acpi_driver_match_device(), that is used in the former, in i2c_device_probe() and don't fail PRP0001 enumeration when no ID table exist. Fixes: c64ffff7a9d1 ("i2c: core: Allow empty id_table in ACPI case as well") BugLink: https://stackoverflow.com/q/63519678/2511795 Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/i2c/i2c-core-base.c')
-rw-r--r--drivers/i2c/i2c-core-base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index cc193f2ba5d3..def62d5b42ca 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -354,7 +354,7 @@ static int i2c_device_probe(struct device *dev)
* or ACPI ID table is supplied for the probing device.
*/
if (!driver->id_table &&
- !i2c_acpi_match_device(dev->driver->acpi_match_table, client) &&
+ !acpi_driver_match_device(dev, dev->driver) &&
!i2c_of_match_device(dev->driver->of_match_table, client)) {
status = -ENODEV;
goto put_sync_adapter;