From: Andy Shevchenko Date: Mon, 23 Jun 2025 13:45:21 +0000 (+0300) Subject: i2c: acpi: Replace custom code with device_match_acpi_handle() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=546b632e12292328e0adce0363eb5f05a53166de;p=thirdparty%2Fkernel%2Fstable.git i2c: acpi: Replace custom code with device_match_acpi_handle() Since driver core provides a generic device_match_acpi_handle() we may replace the custom code with it. Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index d2499f302b508..3445cc3b476be 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c @@ -250,7 +250,7 @@ static int i2c_acpi_get_info(struct acpi_device *adev, if (adapter) { /* The adapter must match the one in I2cSerialBus() connector */ - if (ACPI_HANDLE(&adapter->dev) != lookup.adapter_handle) + if (!device_match_acpi_handle(&adapter->dev, lookup.adapter_handle)) return -ENODEV; } else { struct acpi_device *adapter_adev;