* [PATCH v1 1/1] gpiolib: of: Use device_match_of_node() helper
@ 2022-06-29 11:30 Andy Shevchenko
2022-07-06 12:58 ` Andy Shevchenko
2022-07-08 14:34 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-06-29 11:30 UTC (permalink / raw)
To: Bartosz Golaszewski, linux-gpio, linux-kernel
Cc: Linus Walleij, Andy Shevchenko
Instead of open coding, use device_match_of_node() helper.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.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 3d6c3ffd5576..23b8de98bf7c 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -720,7 +720,7 @@ static void of_gpiochip_remove_hog(struct gpio_chip *chip,
static int of_gpiochip_match_node(struct gpio_chip *chip, void *data)
{
- return chip->gpiodev->dev.of_node == data;
+ return device_match_of_node(&chip->gpiodev->dev, data);
}
static struct gpio_chip *of_find_gpiochip_by_node(struct device_node *np)
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] gpiolib: of: Use device_match_of_node() helper
2022-06-29 11:30 [PATCH v1 1/1] gpiolib: of: Use device_match_of_node() helper Andy Shevchenko
@ 2022-07-06 12:58 ` Andy Shevchenko
2022-07-08 14:34 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-07-06 12:58 UTC (permalink / raw)
To: Bartosz Golaszewski, linux-gpio, linux-kernel; +Cc: Linus Walleij
On Wed, Jun 29, 2022 at 02:30:58PM +0300, Andy Shevchenko wrote:
> Instead of open coding, use device_match_of_node() helper.
Any comments?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] gpiolib: of: Use device_match_of_node() helper
2022-06-29 11:30 [PATCH v1 1/1] gpiolib: of: Use device_match_of_node() helper Andy Shevchenko
2022-07-06 12:58 ` Andy Shevchenko
@ 2022-07-08 14:34 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2022-07-08 14:34 UTC (permalink / raw)
To: Andy Shevchenko
Cc: open list:GPIO SUBSYSTEM, Linux Kernel Mailing List,
Linus Walleij
On Wed, Jun 29, 2022 at 1:30 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Instead of open coding, use device_match_of_node() helper.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.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 3d6c3ffd5576..23b8de98bf7c 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -720,7 +720,7 @@ static void of_gpiochip_remove_hog(struct gpio_chip *chip,
>
> static int of_gpiochip_match_node(struct gpio_chip *chip, void *data)
> {
> - return chip->gpiodev->dev.of_node == data;
> + return device_match_of_node(&chip->gpiodev->dev, data);
> }
>
> static struct gpio_chip *of_find_gpiochip_by_node(struct device_node *np)
> --
> 2.35.1
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-08 14:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-29 11:30 [PATCH v1 1/1] gpiolib: of: Use device_match_of_node() helper Andy Shevchenko
2022-07-06 12:58 ` Andy Shevchenko
2022-07-08 14:34 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).