All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] gpio: tb10x: use module_platform_driver to simplify the code
@ 2013-10-30  3:08 Wei Yongjun
  2013-10-30 18:26 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-10-30  3:08 UTC (permalink / raw)
  To: linus.walleij, grant.likely, rob.herring; +Cc: yongjun_wei, linux-gpio

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

module_platform_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/gpio/gpio-tb10x.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/gpio/gpio-tb10x.c b/drivers/gpio/gpio-tb10x.c
index 833d0f4..af4975c 100644
--- a/drivers/gpio/gpio-tb10x.c
+++ b/drivers/gpio/gpio-tb10x.c
@@ -324,18 +324,7 @@ static struct platform_driver tb10x_gpio_driver = {
 	}
 };
 
-static int __init ab_gpio_init(void)
-{
-	return platform_driver_register(&tb10x_gpio_driver);
-}
-
-static void __exit ab_gpio_exit(void)
-{
-	platform_driver_unregister(&tb10x_gpio_driver);
-}
-
-module_init(ab_gpio_init);
-module_exit(ab_gpio_exit);
+module_platform_driver(tb10x_gpio_driver);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("tb10x gpio.");
 MODULE_VERSION("0.0.1");


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] gpio: tb10x: use module_platform_driver to simplify the code
  2013-10-30  3:08 [PATCH -next] gpio: tb10x: use module_platform_driver to simplify the code Wei Yongjun
@ 2013-10-30 18:26 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2013-10-30 18:26 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Grant Likely, Rob Herring, Wei Yongjun, linux-gpio

On Tue, Oct 29, 2013 at 8:08 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> module_platform_driver() makes the code simpler by eliminating
> boilerplate code.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Patch applied, thanks Wei!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-30 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-30  3:08 [PATCH -next] gpio: tb10x: use module_platform_driver to simplify the code Wei Yongjun
2013-10-30 18:26 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.