diff options
Diffstat (limited to 'include/linux/pnp.h')
-rw-r--r-- | include/linux/pnp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 6512e9cbc6d5..5df733b8f704 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -510,4 +510,16 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { } | |||
510 | 510 | ||
511 | #endif /* CONFIG_PNP */ | 511 | #endif /* CONFIG_PNP */ |
512 | 512 | ||
513 | /** | ||
514 | * module_pnp_driver() - Helper macro for registering a PnP driver | ||
515 | * @__pnp_driver: pnp_driver struct | ||
516 | * | ||
517 | * Helper macro for PnP drivers which do not do anything special in module | ||
518 | * init/exit. This eliminates a lot of boilerplate. Each module may only | ||
519 | * use this macro once, and calling it replaces module_init() and module_exit() | ||
520 | */ | ||
521 | #define module_pnp_driver(__pnp_driver) \ | ||
522 | module_driver(__pnp_driver, pnp_register_driver, \ | ||
523 | pnp_unregister_driver) | ||
524 | |||
513 | #endif /* _LINUX_PNP_H */ | 525 | #endif /* _LINUX_PNP_H */ |