[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iN+28gccy00_Ces9bYsLCNJaHaTZGMUwRrPA6TpY3H8A@mail.gmail.com>
Date: Thu, 7 Oct 2021 18:50:46 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Saravana Kannan <saravanak@...gle.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
linux-i2c <linux-i2c@...r.kernel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Wolfram Sang <wsa@...nel.org>
Subject: Re: [PATCH v2 3/3] gpiolib: acpi: Replace custom code with device_match_acpi_handle()
On Wed, Oct 6, 2021 at 7:31 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> 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@...ux.intel.com>
> ---
> v2: no changes
> drivers/gpio/gpiolib-acpi.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index 47712b6903b5..32f1f720b94b 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) : false;
return gc->parent && device_match_acpi_handle(gc->parent, data);
would work too if I'm not mistaken.
> }
>
> /**
> --
Powered by blists - more mailing lists