diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2015-05-14 23:05:49 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-05-26 14:03:45 +0300 |
commit | cacce073bfd2b4091fbc58e906e7a9a21f538ff6 (patch) | |
tree | 23e66049d861dba1a9cce81bb753444bd64eaccc /include/linux/bcma | |
parent | f911085ffa8863c62344876e0ab6073e4258c246 (diff) |
bcma: add module_bcma_driver()
This makes it possible to save some lines of code in drivers with an
simple bcma driver registration.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'include/linux/bcma')
-rw-r--r-- | include/linux/bcma/bcma.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index e34f906647d3..2ff4a9961e1d 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h @@ -305,6 +305,15 @@ int __bcma_driver_register(struct bcma_driver *drv, struct module *owner); extern void bcma_driver_unregister(struct bcma_driver *drv); +/* module_bcma_driver() - Helper macro for drivers that don't do + * anything special in module init/exit. This eliminates a lot of + * boilerplate. Each module may only use this macro once, and + * calling it replaces module_init() and module_exit() + */ +#define module_bcma_driver(__bcma_driver) \ + module_driver(__bcma_driver, bcma_driver_register, \ + bcma_driver_unregister) + /* Set a fallback SPROM. * See kdoc at the function definition for complete documentation. */ extern int bcma_arch_register_fallback_sprom( |