linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v2 1/2] gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode
Date: Mon, 14 Nov 2022 11:22:03 -0800	[thread overview]
Message-ID: <Y3KVW7OLedkdsVhC@google.com> (raw)
In-Reply-To: <20221114184626.64214-1-andriy.shevchenko@linux.intel.com>

On Mon, Nov 14, 2022 at 08:46:25PM +0200, Andy Shevchenko wrote:
> GPIO library is getting rid of of_node, fwnode should be utilized instead.
> Prepare of_mm_gpiochip_add_data() for fwnode.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

> ---
> v2: added tag (Linus), modified according to Dmitry's suggestion
>  drivers/gpio/gpiolib-of.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index 4be3c21aa718..d30a5210dfdd 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -935,8 +935,8 @@ int of_mm_gpiochip_add_data(struct device_node *np,
>  	if (mm_gc->save_regs)
>  		mm_gc->save_regs(mm_gc);
>  
> -	of_node_put(mm_gc->gc.of_node);
> -	mm_gc->gc.of_node = of_node_get(np);
> +	fwnode_handle_put(mm_gc->gc.fwnode);
> +	mm_gc->gc.fwnode = fwnode_handle_get(of_fwnode_handle(np));
>  
>  	ret = gpiochip_add_data(gc, data);
>  	if (ret)
> 
> base-commit: 8dab99c9eab3162bfb4326c35579a3388dbf68f2
> -- 
> 2.35.1
> 

Thanks.

-- 
Dmitry

  parent reply	other threads:[~2022-11-14 19:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 18:46 [PATCH v2 1/2] gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode Andy Shevchenko
2022-11-14 18:46 ` [PATCH v2 2/2] gpiolib: of: Drop redundant check in of_mm_gpiochip_remove() Andy Shevchenko
2022-11-14 19:22 ` Dmitry Torokhov [this message]
2022-11-15 11:01 ` [PATCH v2 1/2] gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode 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=Y3KVW7OLedkdsVhC@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;
as well as URLs for NNTP newsgroup(s).