From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v1 1/1] gpiolib: of: Make use of device_match_of_node()
Date: Thu, 3 Nov 2022 13:36:29 -0700 [thread overview]
Message-ID: <Y2QmTSfA4qRUarxA@google.com> (raw)
In-Reply-To: <20221103203005.25743-1-andriy.shevchenko@linux.intel.com>
On Thu, Nov 03, 2022 at 10:30:05PM +0200, Andy Shevchenko wrote:
> Make use of device_match_of_node() instead of open coding its
> functionality.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/gpio/gpiolib-of.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index 52616848a37c..4b91e19366a8 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -85,7 +85,7 @@ static int of_gpiochip_match_node_and_xlate(struct gpio_chip *chip, void *data)
> {
> struct of_phandle_args *gpiospec = data;
>
> - return chip->gpiodev->dev.of_node == gpiospec->np &&
> + return device_match_of_node(&chip->gpiodev->dev, gpiospec->np) &&
> chip->of_xlate &&
> chip->of_xlate(chip, gpiospec, NULL) >= 0;
> }
> --
> 2.35.1
>
Thanks.
--
Dmitry
next prev parent reply other threads:[~2022-11-03 20:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 20:30 [PATCH v1 1/1] gpiolib: of: Make use of device_match_of_node() Andy Shevchenko
2022-11-03 20:36 ` Dmitry Torokhov [this message]
2022-11-04 15:11 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2QmTSfA4qRUarxA@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox