aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-pl030.c
diff options
context:
space:
mode:
authorviresh kumar <viresh.kumar@st.com>2012-03-15 05:40:38 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-03-16 19:32:35 -0400
commit9e5ed094c89e55fbf11d2e81d60be98eb12346c0 (patch)
treeb77c63a452580643cdede36c3038d52995e54d8e /drivers/rtc/rtc-pl030.c
parenta64ae394eb7de5e39cf462c18edb202196c678fa (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.c13
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
188static int __init pl030_init(void) 188module_amba_driver(pl030_driver);
189{
190 return amba_driver_register(&pl030_driver);
191}
192
193static void __exit pl030_exit(void)
194{
195 amba_driver_unregister(&pl030_driver);
196}
197
198module_init(pl030_init);
199module_exit(pl030_exit);
200 189
201MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); 190MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
202MODULE_DESCRIPTION("ARM AMBA PL030 RTC Driver"); 191MODULE_DESCRIPTION("ARM AMBA PL030 RTC Driver");