* [PATCH] gpio: mvebu: Remove initcall-based driver initialization
@ 2014-04-24 20:54 Ezequiel Garcia
2014-04-25 10:01 ` Javier Martinez Canillas
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2014-04-24 20:54 UTC (permalink / raw)
To: Linus Walleij, linux-gpio
Cc: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk,
Ezequiel Garcia
There's no reason to use an initcall to initialize this driver,
and regular module_platform_driver() can be used instead.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
drivers/gpio/gpio-mvebu.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index d425094..7d64cde 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -738,9 +738,4 @@ static struct platform_driver mvebu_gpio_driver = {
},
.probe = mvebu_gpio_probe,
};
-
-static int __init mvebu_gpio_init(void)
-{
- return platform_driver_register(&mvebu_gpio_driver);
-}
-postcore_initcall(mvebu_gpio_init);
+module_platform_driver(mvebu_gpio_driver);
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gpio: mvebu: Remove initcall-based driver initialization
2014-04-24 20:54 [PATCH] gpio: mvebu: Remove initcall-based driver initialization Ezequiel Garcia
@ 2014-04-25 10:01 ` Javier Martinez Canillas
2014-04-29 13:23 ` Jason Cooper
2014-05-09 9:09 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2014-04-25 10:01 UTC (permalink / raw)
To: Ezequiel Garcia
Cc: Linus Walleij, Linux GPIO List, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Thomas Petazzoni, Gregory Clement,
Lior Amsalem, Tawfik Bayouk
Hello Ezequiel,
On Thu, Apr 24, 2014 at 10:54 PM, Ezequiel Garcia
<ezequiel.garcia@free-electrons.com> wrote:
> There's no reason to use an initcall to initialize this driver,
> and regular module_platform_driver() can be used instead.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> ---
> drivers/gpio/gpio-mvebu.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index d425094..7d64cde 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -738,9 +738,4 @@ static struct platform_driver mvebu_gpio_driver = {
> },
> .probe = mvebu_gpio_probe,
> };
> -
> -static int __init mvebu_gpio_init(void)
> -{
> - return platform_driver_register(&mvebu_gpio_driver);
> -}
> -postcore_initcall(mvebu_gpio_init);
> +module_platform_driver(mvebu_gpio_driver);
> --
> 1.9.1
>
> --
Looks good to me.
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gpio: mvebu: Remove initcall-based driver initialization
2014-04-24 20:54 [PATCH] gpio: mvebu: Remove initcall-based driver initialization Ezequiel Garcia
2014-04-25 10:01 ` Javier Martinez Canillas
@ 2014-04-29 13:23 ` Jason Cooper
2014-05-09 9:09 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Jason Cooper @ 2014-04-29 13:23 UTC (permalink / raw)
To: Ezequiel Garcia
Cc: Linus Walleij, linux-gpio, Andrew Lunn, Sebastian Hesselbarth,
Thomas Petazzoni, Gregory Clement, Lior Amsalem, Tawfik Bayouk
On Thu, Apr 24, 2014 at 05:54:50PM -0300, Ezequiel Garcia wrote:
> There's no reason to use an initcall to initialize this driver,
> and regular module_platform_driver() can be used instead.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> ---
> drivers/gpio/gpio-mvebu.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Acked-by: Jason Cooper <jason@lakedaemon.net>
thx,
Jason.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gpio: mvebu: Remove initcall-based driver initialization
2014-04-24 20:54 [PATCH] gpio: mvebu: Remove initcall-based driver initialization Ezequiel Garcia
2014-04-25 10:01 ` Javier Martinez Canillas
2014-04-29 13:23 ` Jason Cooper
@ 2014-05-09 9:09 ` Linus Walleij
2014-05-09 13:08 ` Ezequiel Garcia
2 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2014-05-09 9:09 UTC (permalink / raw)
To: Ezequiel Garcia
Cc: linux-gpio@vger.kernel.org, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Thomas Petazzoni, Gregory Clement,
Lior Amsalem, Tawfik Bayouk
On Thu, Apr 24, 2014 at 10:54 PM, Ezequiel Garcia
<ezequiel.garcia@free-electrons.com> wrote:
> There's no reason to use an initcall to initialize this driver,
> and regular module_platform_driver() can be used instead.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Has anyone tested this on real hardware? That is the only test that
counts on initcalls as it happens.
That said, patch is tentatively applied as I guess you have the hardware.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gpio: mvebu: Remove initcall-based driver initialization
2014-05-09 9:09 ` Linus Walleij
@ 2014-05-09 13:08 ` Ezequiel Garcia
0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2014-05-09 13:08 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-gpio@vger.kernel.org, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Thomas Petazzoni, Gregory Clement,
Lior Amsalem, Tawfik Bayouk
On 09 May 11:09 AM, Linus Walleij wrote:
> On Thu, Apr 24, 2014 at 10:54 PM, Ezequiel Garcia
> <ezequiel.garcia@free-electrons.com> wrote:
>
> > There's no reason to use an initcall to initialize this driver,
> > and regular module_platform_driver() can be used instead.
> >
> > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
>
> Has anyone tested this on real hardware? That is the only test that
> counts on initcalls as it happens.
>
Yup, tested on my mvebu boards, don't remember which one.
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-09 13:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-24 20:54 [PATCH] gpio: mvebu: Remove initcall-based driver initialization Ezequiel Garcia
2014-04-25 10:01 ` Javier Martinez Canillas
2014-04-29 13:23 ` Jason Cooper
2014-05-09 9:09 ` Linus Walleij
2014-05-09 13:08 ` Ezequiel Garcia
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).