From: Suzuki K Poulose Date: Thu, 1 Aug 2019 10:20:24 +0000 (+0100) Subject: i2c: Revert incorrect conversion to use generic helper X-Git-Tag: v5.4-rc1~137^2~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=644bf60088955421051e716ab9c8fe7fb7997fd7;p=thirdparty%2Fkernel%2Flinux.git i2c: Revert incorrect conversion to use generic helper The patch "drivers: Introduce device lookup variants by ACPI_COMPANION device" converted an incorrect instance in i2c driver to a new helper. Revert this change. Reported-by: Stephen Rothwell Cc: Mika Westerberg Cc: Wolfram Sang Fixes: 00500147cbd3 ("drivers: Introduce device lookup variants by ACPI_COMPANION device") Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20190801102026.27312-1-suzuki.poulose@arm.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index bc80aafb521fa..f60f7a95d48e7 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c @@ -357,7 +357,10 @@ static int i2c_acpi_find_match_adapter(struct device *dev, const void *data) struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle) { - struct device *dev = bus_find_device_by_acpi_dev(&i2c_bus_type, handle); + struct device *dev; + + dev = bus_find_device(&i2c_bus_type, NULL, handle, + i2c_acpi_find_match_adapter); return dev ? i2c_verify_adapter(dev) : NULL; }