diff options
author | viresh kumar <viresh.kumar@st.com> | 2012-03-15 13:40:38 +0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-17 03:32:35 +0400 |
commit | 9e5ed094c89e55fbf11d2e81d60be98eb12346c0 (patch) | |
tree | b77c63a452580643cdede36c3038d52995e54d8e /drivers/input/serio/ambakmi.c | |
parent | a64ae394eb7de5e39cf462c18edb202196c678fa (diff) | |
download | linux-9e5ed094c89e55fbf11d2e81d60be98eb12346c0.tar.xz |
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/input/serio/ambakmi.c')
-rw-r--r-- | drivers/input/serio/ambakmi.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 8407d5b0ced8..2ffd110bd5bc 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c @@ -208,18 +208,7 @@ static struct amba_driver ambakmi_driver = { .resume = amba_kmi_resume, }; -static int __init amba_kmi_init(void) -{ - return amba_driver_register(&ambakmi_driver); -} - -static void __exit amba_kmi_exit(void) -{ - amba_driver_unregister(&ambakmi_driver); -} - -module_init(amba_kmi_init); -module_exit(amba_kmi_exit); +module_amba_driver(ambakmi_driver); MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); MODULE_DESCRIPTION("AMBA KMI controller driver"); |