* [PATCH] mtd: nand/gpio: Use module_platform_driver macro
@ 2012-09-05 10:01 Sachin Kamat
2012-09-14 15:32 ` Sachin Kamat
2012-09-22 15:56 ` Artem Bityutskiy
0 siblings, 2 replies; 3+ messages in thread
From: Sachin Kamat @ 2012-09-05 10:01 UTC (permalink / raw)
To: linux-mtd; +Cc: sachin.kamat, artem.bityutskiy, patches, dwmw2, dedekind1
module_platform_driver simplifies the code by eliminating
module_init and module_exit calls.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/mtd/nand/gpio.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c
index ce6a284..bc73bc5 100644
--- a/drivers/mtd/nand/gpio.c
+++ b/drivers/mtd/nand/gpio.c
@@ -417,20 +417,7 @@ static struct platform_driver gpio_nand_driver = {
},
};
-static int __init gpio_nand_init(void)
-{
- printk(KERN_INFO "GPIO NAND driver, © 2004 Simtec Electronics\n");
-
- return platform_driver_register(&gpio_nand_driver);
-}
-
-static void __exit gpio_nand_exit(void)
-{
- platform_driver_unregister(&gpio_nand_driver);
-}
-
-module_init(gpio_nand_init);
-module_exit(gpio_nand_exit);
+module_platform_driver(gpio_nand_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: nand/gpio: Use module_platform_driver macro
2012-09-05 10:01 [PATCH] mtd: nand/gpio: Use module_platform_driver macro Sachin Kamat
@ 2012-09-14 15:32 ` Sachin Kamat
2012-09-22 15:56 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Sachin Kamat @ 2012-09-14 15:32 UTC (permalink / raw)
To: linux-mtd; +Cc: sachin.kamat, artem.bityutskiy, patches, dwmw2, dedekind1
ping..
On 5 September 2012 15:31, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> module_platform_driver simplifies the code by eliminating
> module_init and module_exit calls.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> drivers/mtd/nand/gpio.c | 15 +--------------
> 1 files changed, 1 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c
> index ce6a284..bc73bc5 100644
> --- a/drivers/mtd/nand/gpio.c
> +++ b/drivers/mtd/nand/gpio.c
> @@ -417,20 +417,7 @@ static struct platform_driver gpio_nand_driver = {
> },
> };
>
> -static int __init gpio_nand_init(void)
> -{
> - printk(KERN_INFO "GPIO NAND driver, © 2004 Simtec Electronics\n");
> -
> - return platform_driver_register(&gpio_nand_driver);
> -}
> -
> -static void __exit gpio_nand_exit(void)
> -{
> - platform_driver_unregister(&gpio_nand_driver);
> -}
> -
> -module_init(gpio_nand_init);
> -module_exit(gpio_nand_exit);
> +module_platform_driver(gpio_nand_driver);
>
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
> --
> 1.7.4.1
>
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: nand/gpio: Use module_platform_driver macro
2012-09-05 10:01 [PATCH] mtd: nand/gpio: Use module_platform_driver macro Sachin Kamat
2012-09-14 15:32 ` Sachin Kamat
@ 2012-09-22 15:56 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2012-09-22 15:56 UTC (permalink / raw)
To: Sachin Kamat; +Cc: artem.bityutskiy, linux-mtd, dwmw2, patches
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
On Wed, 2012-09-05 at 15:31 +0530, Sachin Kamat wrote:
> module_platform_driver simplifies the code by eliminating
> module_init and module_exit calls.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-22 15:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 10:01 [PATCH] mtd: nand/gpio: Use module_platform_driver macro Sachin Kamat
2012-09-14 15:32 ` Sachin Kamat
2012-09-22 15:56 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox