* [PATCH] gpio: rcar: Always use local variable dev in gpio_rcar_probe()
@ 2021-07-14 12:51 Geert Uytterhoeven
2021-07-14 14:31 ` Niklas Söderlund
2021-07-16 8:22 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-07-14 12:51 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski
Cc: linux-gpio, linux-renesas-soc, Geert Uytterhoeven
As we have already have a pointer to the device structure in a local
variable in gpio_rcar_probe(), we can just use "dev" instead of
"p->dev".
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/gpio/gpio-rcar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index e7092d5fe700d2ce..ae1ffb2b230d4a32 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -564,9 +564,9 @@ static int gpio_rcar_probe(struct platform_device *pdev)
}
if (p->info.has_inen) {
- pm_runtime_get_sync(p->dev);
+ pm_runtime_get_sync(dev);
gpio_rcar_enable_inputs(p);
- pm_runtime_put(p->dev);
+ pm_runtime_put(dev);
}
dev_info(dev, "driving %d GPIOs\n", npins);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: rcar: Always use local variable dev in gpio_rcar_probe()
2021-07-14 12:51 [PATCH] gpio: rcar: Always use local variable dev in gpio_rcar_probe() Geert Uytterhoeven
@ 2021-07-14 14:31 ` Niklas Söderlund
2021-07-16 8:22 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2021-07-14 14:31 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linus Walleij, Bartosz Golaszewski, linux-gpio, linux-renesas-soc
Hi Geert,
On 2021-07-14 14:51:13 +0200, Geert Uytterhoeven wrote:
> As we have already have a pointer to the device structure in a local
> variable in gpio_rcar_probe(), we can just use "dev" instead of
> "p->dev".
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> drivers/gpio/gpio-rcar.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
> index e7092d5fe700d2ce..ae1ffb2b230d4a32 100644
> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -564,9 +564,9 @@ static int gpio_rcar_probe(struct platform_device *pdev)
> }
>
> if (p->info.has_inen) {
> - pm_runtime_get_sync(p->dev);
> + pm_runtime_get_sync(dev);
> gpio_rcar_enable_inputs(p);
> - pm_runtime_put(p->dev);
> + pm_runtime_put(dev);
> }
>
> dev_info(dev, "driving %d GPIOs\n", npins);
> --
> 2.25.1
>
--
Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: rcar: Always use local variable dev in gpio_rcar_probe()
2021-07-14 12:51 [PATCH] gpio: rcar: Always use local variable dev in gpio_rcar_probe() Geert Uytterhoeven
2021-07-14 14:31 ` Niklas Söderlund
@ 2021-07-16 8:22 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2021-07-16 8:22 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linus Walleij, linux-gpio, Linux-Renesas
On Wed, Jul 14, 2021 at 2:51 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> As we have already have a pointer to the device structure in a local
> variable in gpio_rcar_probe(), we can just use "dev" instead of
> "p->dev".
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/gpio/gpio-rcar.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
> index e7092d5fe700d2ce..ae1ffb2b230d4a32 100644
> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -564,9 +564,9 @@ static int gpio_rcar_probe(struct platform_device *pdev)
> }
>
> if (p->info.has_inen) {
> - pm_runtime_get_sync(p->dev);
> + pm_runtime_get_sync(dev);
> gpio_rcar_enable_inputs(p);
> - pm_runtime_put(p->dev);
> + pm_runtime_put(dev);
> }
>
> dev_info(dev, "driving %d GPIOs\n", npins);
> --
> 2.25.1
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-16 8:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 12:51 [PATCH] gpio: rcar: Always use local variable dev in gpio_rcar_probe() Geert Uytterhoeven
2021-07-14 14:31 ` Niklas Söderlund
2021-07-16 8:22 ` 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).