From: Peter Ujfalusi Date: Wed, 3 Jul 2013 22:07:56 +0000 (-0700) Subject: drivers/rtc/rtc-twl.c: cleanup with module_platform_driver() conversion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5ee67484dede220d96c0b323c78d02c63fdfae44;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drivers/rtc/rtc-twl.c: cleanup with module_platform_driver() conversion Use module_platform_driver() to register the platform driver. Signed-off-by: Peter Ujfalusi Acked-by: Kevin Hilman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 8a04044a9c1c..02faf3c4e0d5 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -626,17 +626,7 @@ static struct platform_driver twl4030rtc_driver = { }, }; -static int __init twl_rtc_init(void) -{ - return platform_driver_register(&twl4030rtc_driver); -} -module_init(twl_rtc_init); - -static void __exit twl_rtc_exit(void) -{ - platform_driver_unregister(&twl4030rtc_driver); -} -module_exit(twl_rtc_exit); +module_platform_driver(twl4030rtc_driver); MODULE_AUTHOR("Texas Instruments, MontaVista Software"); MODULE_LICENSE("GPL");