]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
i2c: acpi: Replace custom code with device_match_acpi_handle()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 23 Jun 2025 13:45:21 +0000 (16:45 +0300)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 27 Jun 2025 10:21:05 +0000 (12:21 +0200)
Since driver core provides a generic device_match_acpi_handle()
we may replace the custom code with it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-core-acpi.c

index d2499f302b50833592de6de91eb27f19327f5412..3445cc3b476be120d491ec7f04dcd1907b808221 100644 (file)
@@ -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;