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 /sound | |
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 'sound')
-rw-r--r-- | sound/arm/aaci.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index b37b702a3a6a..5119fdabcb98 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -1110,18 +1110,7 @@ static struct amba_driver aaci_driver = { | |||
1110 | .id_table = aaci_ids, | 1110 | .id_table = aaci_ids, |
1111 | }; | 1111 | }; |
1112 | 1112 | ||
1113 | static int __init aaci_init(void) | 1113 | module_amba_driver(aaci_driver); |
1114 | { | ||
1115 | return amba_driver_register(&aaci_driver); | ||
1116 | } | ||
1117 | |||
1118 | static void __exit aaci_exit(void) | ||
1119 | { | ||
1120 | amba_driver_unregister(&aaci_driver); | ||
1121 | } | ||
1122 | |||
1123 | module_init(aaci_init); | ||
1124 | module_exit(aaci_exit); | ||
1125 | 1114 | ||
1126 | MODULE_LICENSE("GPL"); | 1115 | MODULE_LICENSE("GPL"); |
1127 | MODULE_DESCRIPTION("ARM PrimeCell PL041 Advanced Audio CODEC Interface driver"); | 1116 | MODULE_DESCRIPTION("ARM PrimeCell PL041 Advanced Audio CODEC Interface driver"); |