diff options
author | viresh kumar <viresh.kumar@st.com> | 2012-03-15 05:40:38 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-16 19:32:35 -0400 |
commit | 9e5ed094c89e55fbf11d2e81d60be98eb12346c0 (patch) | |
tree | b77c63a452580643cdede36c3038d52995e54d8e /drivers/watchdog/sp805_wdt.c | |
parent | a64ae394eb7de5e39cf462c18edb202196c678fa (diff) |
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 <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/watchdog/sp805_wdt.c')
-rw-r--r-- | drivers/watchdog/sp805_wdt.c | 12 |
1 files changed, 1 insertions, 11 deletions
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 = { | |||
370 | .remove = __devexit_p(sp805_wdt_remove), | 370 | .remove = __devexit_p(sp805_wdt_remove), |
371 | }; | 371 | }; |
372 | 372 | ||
373 | static int __init sp805_wdt_init(void) | 373 | module_amba_driver(sp805_wdt_driver); |
374 | { | ||
375 | return amba_driver_register(&sp805_wdt_driver); | ||
376 | } | ||
377 | module_init(sp805_wdt_init); | ||
378 | |||
379 | static void __exit sp805_wdt_exit(void) | ||
380 | { | ||
381 | amba_driver_unregister(&sp805_wdt_driver); | ||
382 | } | ||
383 | module_exit(sp805_wdt_exit); | ||
384 | 374 | ||
385 | module_param(nowayout, int, 0); | 375 | module_param(nowayout, int, 0); |
386 | MODULE_PARM_DESC(nowayout, | 376 | MODULE_PARM_DESC(nowayout, |