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>
This commit is contained in:

committed by
Russell King

parent
a64ae394eb
commit
9e5ed094c8
@@ -1110,18 +1110,7 @@ static struct amba_driver aaci_driver = {
|
||||
.id_table = aaci_ids,
|
||||
};
|
||||
|
||||
static int __init aaci_init(void)
|
||||
{
|
||||
return amba_driver_register(&aaci_driver);
|
||||
}
|
||||
|
||||
static void __exit aaci_exit(void)
|
||||
{
|
||||
amba_driver_unregister(&aaci_driver);
|
||||
}
|
||||
|
||||
module_init(aaci_init);
|
||||
module_exit(aaci_exit);
|
||||
module_amba_driver(aaci_driver);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("ARM PrimeCell PL041 Advanced Audio CODEC Interface driver");
|
||||
|
Reference in New Issue
Block a user