bcma: add module_bcma_driver()
[linux-2.6-block.git] / include / linux / bcma / bcma.h
index e34f906647d39dce39985d1cfe836f42b689c556..2ff4a9961e1d5166741f98f80651a516d6ef8eb5 100644 (file)
@@ -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(