diff options
| author | Andy Shevchenko <[email protected]> | 2021-10-14 13:47:56 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-10-20 17:39:01 +0000 |
| commit | adb5151fa82ca8cc511c7d6bf80842281c09ea42 (patch) | |
| tree | 84122ca6b1e2ea96a069eed4e26536716de64969 | |
| parent | i2c: acpi: Replace custom function with device_match_acpi_handle() (diff) | |
| download | kernel-adb5151fa82ca8cc511c7d6bf80842281c09ea42.tar.gz kernel-adb5151fa82ca8cc511c7d6bf80842281c09ea42.zip | |
gpiolib: 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 <[email protected]>
Reviewed-by: Rafael J. Wysocki <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 47712b6903b5..985e8589c58b 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -95,10 +95,7 @@ static bool acpi_gpio_deferred_req_irqs_done; static int acpi_gpiochip_find(struct gpio_chip *gc, void *data) { - if (!gc->parent) - return false; - - return ACPI_HANDLE(gc->parent) == data; + return gc->parent && device_match_acpi_handle(gc->parent, data); } /** |
