mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Russell King <[email protected]>
This commit is contained in:
parent
a64ae394eb
commit
9e5ed094c8
9 changed files with 17 additions and 94 deletions
|
|
@ -1035,18 +1035,7 @@ static struct amba_driver pl330_driver = {
|
|||
.remove = pl330_remove,
|
||||
};
|
||||
|
||||
static int __init pl330_init(void)
|
||||
{
|
||||
return amba_driver_register(&pl330_driver);
|
||||
}
|
||||
module_init(pl330_init);
|
||||
|
||||
static void __exit pl330_exit(void)
|
||||
{
|
||||
amba_driver_unregister(&pl330_driver);
|
||||
return;
|
||||
}
|
||||
module_exit(pl330_exit);
|
||||
module_amba_driver(pl330_driver);
|
||||
|
||||
MODULE_AUTHOR("Jaswinder Singh <[email protected]>");
|
||||
MODULE_DESCRIPTION("API Driver for PL330 DMAC");
|
||||
|
|
|
|||
Loading…
Reference in a new issue