* [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register
@ 2014-07-07 16:09 Himangi Saraogi
2014-07-08 7:50 ` Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Himangi Saraogi @ 2014-07-07 16:09 UTC (permalink / raw)
To: Linus Walleij, linux-kernel; +Cc: julia.lawall
This patch moves data allocated using regulator_register to
devm_regulator_register and does away the calls to regulator_unregister.
The sh73a0_pinmux_soc_exit function is no longer needed and is removed.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
---
To send to: Linus Walleij <linus.walleij@linaro.org>,linux-kernel@vger.kernel.org
drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
index ee370de..0bd8f44 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
@@ -3842,7 +3842,8 @@ static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)
cfg.init_data = &sh73a0_vccq_mc0_init_data;
cfg.driver_data = pfc;
- data->vccq_mc0 = regulator_register(&sh73a0_vccq_mc0_desc, &cfg);
+ data->vccq_mc0 = devm_regulator_register(pfc->dev,
+ &sh73a0_vccq_mc0_desc, &cfg);
if (IS_ERR(data->vccq_mc0)) {
ret = PTR_ERR(data->vccq_mc0);
dev_err(pfc->dev, "Failed to register VCCQ MC0 regulator: %d\n",
@@ -3855,16 +3856,8 @@ static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)
return 0;
}
-static void sh73a0_pinmux_soc_exit(struct sh_pfc *pfc)
-{
- struct sh73a0_pinmux_data *data = pfc->soc_data;
-
- regulator_unregister(data->vccq_mc0);
-}
-
static const struct sh_pfc_soc_operations sh73a0_pinmux_ops = {
.init = sh73a0_pinmux_soc_init,
- .exit = sh73a0_pinmux_soc_exit,
.get_bias = sh73a0_pinmux_get_bias,
.set_bias = sh73a0_pinmux_set_bias,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register
2014-07-07 16:09 [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register Himangi Saraogi
@ 2014-07-08 7:50 ` Geert Uytterhoeven
2014-07-09 10:32 ` Linus Walleij
2014-07-10 9:35 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-07-08 7:50 UTC (permalink / raw)
To: Himangi Saraogi
Cc: Linus Walleij, linux-kernel@vger.kernel.org, Julia Lawall,
Linux-sh list
CC linux-sh
On Mon, Jul 7, 2014 at 6:09 PM, Himangi Saraogi <himangi774@gmail.com> wrote:
> This patch moves data allocated using regulator_register to
> devm_regulator_register and does away the calls to regulator_unregister.
> The sh73a0_pinmux_soc_exit function is no longer needed and is removed.
>
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
> To send to: Linus Walleij <linus.walleij@linaro.org>,linux-kernel@vger.kernel.org
> drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
> index ee370de..0bd8f44 100644
> --- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
> +++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
> @@ -3842,7 +3842,8 @@ static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)
> cfg.init_data = &sh73a0_vccq_mc0_init_data;
> cfg.driver_data = pfc;
>
> - data->vccq_mc0 = regulator_register(&sh73a0_vccq_mc0_desc, &cfg);
> + data->vccq_mc0 = devm_regulator_register(pfc->dev,
> + &sh73a0_vccq_mc0_desc, &cfg);
> if (IS_ERR(data->vccq_mc0)) {
> ret = PTR_ERR(data->vccq_mc0);
> dev_err(pfc->dev, "Failed to register VCCQ MC0 regulator: %d\n",
> @@ -3855,16 +3856,8 @@ static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)
> return 0;
> }
>
> -static void sh73a0_pinmux_soc_exit(struct sh_pfc *pfc)
> -{
> - struct sh73a0_pinmux_data *data = pfc->soc_data;
> -
> - regulator_unregister(data->vccq_mc0);
> -}
> -
> static const struct sh_pfc_soc_operations sh73a0_pinmux_ops = {
> .init = sh73a0_pinmux_soc_init,
> - .exit = sh73a0_pinmux_soc_exit,
> .get_bias = sh73a0_pinmux_get_bias,
> .set_bias = sh73a0_pinmux_set_bias,
> };
> --
> 1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register
2014-07-07 16:09 [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register Himangi Saraogi
2014-07-08 7:50 ` Geert Uytterhoeven
@ 2014-07-09 10:32 ` Linus Walleij
2014-07-09 13:16 ` Laurent Pinchart
2014-07-10 9:35 ` Linus Walleij
2 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2014-07-09 10:32 UTC (permalink / raw)
To: Himangi Saraogi, Laurent Pinchart
Cc: linux-kernel@vger.kernel.org, Julia Lawall
On Mon, Jul 7, 2014 at 6:09 PM, Himangi Saraogi <himangi774@gmail.com> wrote:
> This patch moves data allocated using regulator_register to
> devm_regulator_register and does away the calls to regulator_unregister.
> The sh73a0_pinmux_soc_exit function is no longer needed and is removed.
>
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Laurent is maintaining this driver so let's see if he can ACK it.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register
2014-07-09 10:32 ` Linus Walleij
@ 2014-07-09 13:16 ` Laurent Pinchart
0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2014-07-09 13:16 UTC (permalink / raw)
To: Linus Walleij; +Cc: Himangi Saraogi, linux-kernel@vger.kernel.org, Julia Lawall
On Wednesday 09 July 2014 12:32:44 Linus Walleij wrote:
> On Mon, Jul 7, 2014 at 6:09 PM, Himangi Saraogi wrote:
> > This patch moves data allocated using regulator_register to
> > devm_regulator_register and does away the calls to regulator_unregister.
> > The sh73a0_pinmux_soc_exit function is no longer needed and is removed.
> >
> > Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> > Acked-by: Julia Lawall <julia.lawall@lip6.fr>
>
> Laurent is maintaining this driver so let's see if he can ACK it.
Assuming we're talking about https://lkml.org/lkml/2014/7/7/386,
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register
2014-07-07 16:09 [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register Himangi Saraogi
2014-07-08 7:50 ` Geert Uytterhoeven
2014-07-09 10:32 ` Linus Walleij
@ 2014-07-10 9:35 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2014-07-10 9:35 UTC (permalink / raw)
To: Himangi Saraogi; +Cc: linux-kernel@vger.kernel.org, Julia Lawall
On Mon, Jul 7, 2014 at 6:09 PM, Himangi Saraogi <himangi774@gmail.com> wrote:
> This patch moves data allocated using regulator_register to
> devm_regulator_register and does away the calls to regulator_unregister.
> The sh73a0_pinmux_soc_exit function is no longer needed and is removed.
>
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Patch applied with Laurent's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-10 9:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 16:09 [PATCH] sh-pfc: sh73a0: Introduce the use of devm_regulator_register Himangi Saraogi
2014-07-08 7:50 ` Geert Uytterhoeven
2014-07-09 10:32 ` Linus Walleij
2014-07-09 13:16 ` Laurent Pinchart
2014-07-10 9:35 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox