diff mbox series

gpio: rcar: Always use local variable dev in gpio_rcar_probe()

Message ID c2d40c6934507ee694be43cda24387a1feef7b10.1626267044.git.geert+renesas@glider.be
State Accepted
Commit 3d134e75c08bd2f19bf80ffddfbd3eab3160ef07
Headers show
Series gpio: rcar: Always use local variable dev in gpio_rcar_probe() | expand

Commit Message

Geert Uytterhoeven July 14, 2021, 12:51 p.m. UTC
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(-)

Comments

Bartosz Golaszewski July 16, 2021, 8:22 a.m. UTC | #1
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
diff mbox series

Patch

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);