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/rtc/rtc-pl030.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/rtc/rtc-pl030.c')
-rw-r--r-- | drivers/rtc/rtc-pl030.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-pl030.c b/drivers/rtc/rtc-pl030.c index 02111fee077e..b2d3d20baebc 100644 --- a/drivers/rtc/rtc-pl030.c +++ b/drivers/rtc/rtc-pl030.c | |||
@@ -185,18 +185,7 @@ static struct amba_driver pl030_driver = { | |||
185 | .id_table = pl030_ids, | 185 | .id_table = pl030_ids, |
186 | }; | 186 | }; |
187 | 187 | ||
188 | static int __init pl030_init(void) | 188 | module_amba_driver(pl030_driver); |
189 | { | ||
190 | return amba_driver_register(&pl030_driver); | ||
191 | } | ||
192 | |||
193 | static void __exit pl030_exit(void) | ||
194 | { | ||
195 | amba_driver_unregister(&pl030_driver); | ||
196 | } | ||
197 | |||
198 | module_init(pl030_init); | ||
199 | module_exit(pl030_exit); | ||
200 | 189 | ||
201 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); | 190 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); |
202 | MODULE_DESCRIPTION("ARM AMBA PL030 RTC Driver"); | 191 | MODULE_DESCRIPTION("ARM AMBA PL030 RTC Driver"); |