i2c: core: Don't fail PRP0001 enumeration when no ID table exist
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 21 Aug 2020 17:03:33 +0000 (20:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:28 +0000 (11:29 +0200)
commitf24ffc31709b0da51dc84cdbedad4cc6f17052c2
treec965cb507331aaf6a1d2bdd2aa695c478a8aadc8
parenta416b1e870b15a93c492951cc2ee1e1aa06759cd
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>
drivers/i2c/i2c-core-base.c