Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <andriy.shevchenko@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20211014134756.39092-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
adb5151f 0a2d47aa

+1 -4
+1 -4
drivers/gpio/gpiolib-acpi.c
··· 95 95 96 96 static int acpi_gpiochip_find(struct gpio_chip *gc, void *data) 97 97 { 98 - if (!gc->parent) 99 - return false; 100 - 101 - return ACPI_HANDLE(gc->parent) == data; 98 + return gc->parent && device_match_acpi_handle(gc->parent, data); 102 99 } 103 100 104 101 /**