Message ID | 20200821170334.43555-1-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [v1,1/2] i2c: core: Don't fail PRP0001 enumeration when no ID table exist | expand |
On Fri, Aug 21, 2020 at 08:03:33PM +0300, Andy Shevchenko wrote: > 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>
On Fri, Aug 21, 2020 at 08:03:33PM +0300, Andy Shevchenko wrote: > 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 You are monitoring SO? Nice. > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Applied to for-current, thanks!
On Tue, Aug 25, 2020 at 09:23:14AM +0200, Wolfram Sang wrote: > On Fri, Aug 21, 2020 at 08:03:33PM +0300, Andy Shevchenko wrote: > > 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 > > You are monitoring SO? Nice. Monitoring is probably too strong word here, rather sometimes looking for interesting topics (mostly related to ACPI + Linux (kernel) and near to them). This makes me wonder how many commits are actually referring to SO. The 1st one I found is 8c88f87cb27a ("netfilter: nfnetlink_queue: add NAT TCP sequence adjustment if packet mangled"). Some of them referring stackexchange site, but not many (brief estimation like a couple of dozens at most). > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Applied to for-current, thanks! Thanks!
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 34a9609f256d..5ec082e2039d 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -480,7 +480,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;
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> --- drivers/i2c/i2c-core-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)