From 9e5ed094c89e55fbf11d2e81d60be98eb12346c0 Mon Sep 17 00:00:00 2001 From: viresh kumar Date: Thu, 15 Mar 2012 10:40:38 +0100 Subject: ARM: 7362/1: AMBA: Add module_amba_driver() helper macro for amba_driver For simple modules that contain a single amba_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_amba_driver(), which replaces the module_init()/module_exit() registrations with template functions. Signed-off-by: Viresh Kumar Signed-off-by: Russell King --- drivers/watchdog/sp805_wdt.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/watchdog') diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index eef1524ae52e..3ff9e47bd218 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c @@ -370,17 +370,7 @@ static struct amba_driver sp805_wdt_driver = { .remove = __devexit_p(sp805_wdt_remove), }; -static int __init sp805_wdt_init(void) -{ - return amba_driver_register(&sp805_wdt_driver); -} -module_init(sp805_wdt_init); - -static void __exit sp805_wdt_exit(void) -{ - amba_driver_unregister(&sp805_wdt_driver); -} -module_exit(sp805_wdt_exit); +module_amba_driver(sp805_wdt_driver); module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, -- cgit v1.2.3-58-ga151