diff options
author | viresh kumar <viresh.kumar@st.com> | 2012-03-15 10:40:38 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-16 23:32:35 +0000 |
commit | 9e5ed094c89e55fbf11d2e81d60be98eb12346c0 (patch) | |
tree | b77c63a452580643cdede36c3038d52995e54d8e /drivers/char/hw_random | |
parent | a64ae394eb7de5e39cf462c18edb202196c678fa (diff) | |
download | talos-op-linux-9e5ed094c89e55fbf11d2e81d60be98eb12346c0.tar.gz talos-op-linux-9e5ed094c89e55fbf11d2e81d60be98eb12346c0.zip |
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/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/nomadik-rng.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/char/hw_random/nomadik-rng.c b/drivers/char/hw_random/nomadik-rng.c index 3d3c1e6703b4..96de0249e595 100644 --- a/drivers/char/hw_random/nomadik-rng.c +++ b/drivers/char/hw_random/nomadik-rng.c @@ -107,17 +107,6 @@ static struct amba_driver nmk_rng_driver = { .id_table = nmk_rng_ids, }; -static int __init nmk_rng_init(void) -{ - return amba_driver_register(&nmk_rng_driver); -} - -static void __devexit nmk_rng_exit(void) -{ - amba_driver_unregister(&nmk_rng_driver); -} - -module_init(nmk_rng_init); -module_exit(nmk_rng_exit); +module_amba_driver(nmk_rng_driver); MODULE_LICENSE("GPL"); |