Switch to the generic helper to match device by acpi_dev. Cc: Mika Westerberg <mika.westerb...@linux.intel.com> Cc: Wolfram Sang <w...@the-dreams.de> cc: linux-...@vger.kernel.org Signed-off-by: Suzuki K Poulose <suzuki.poul...@arm.com> --- drivers/i2c/i2c-core-acpi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index d840955..e28165b 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c @@ -328,11 +328,6 @@ static int i2c_acpi_find_match_adapter(struct device *dev, void *data) return ACPI_HANDLE(dev) == (acpi_handle)data; } -static int i2c_acpi_find_match_device(struct device *dev, void *data) -{ - return ACPI_COMPANION(dev) == data; -} - static struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle) { struct device *dev; @@ -346,8 +341,7 @@ static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev) { struct device *dev; - dev = bus_find_device(&i2c_bus_type, NULL, adev, - i2c_acpi_find_match_device); + dev = bus_find_device(&i2c_bus_type, NULL, adev, device_match_acpi_dev); return dev ? i2c_verify_client(dev) : NULL; } -- 2.7.4