mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
Documentation/auxiliary_bus: Add example code for module_auxiliary_driver()
Add an example code snipit to the module_auxiliary_driver() documentation which is consistent with the other example code in the elsewhere in the documentation. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Link: https://lore.kernel.org/r/20211202044305.4006853-6-ira.weiny@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
05021dca78
commit
14866a7db8
1 changed files with 4 additions and 0 deletions
|
@ -66,6 +66,10 @@ void auxiliary_driver_unregister(struct auxiliary_driver *auxdrv);
|
|||
* Helper macro for auxiliary drivers which do not 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()
|
||||
*
|
||||
* .. code-block:: c
|
||||
*
|
||||
* module_auxiliary_driver(my_drv);
|
||||
*/
|
||||
#define module_auxiliary_driver(__auxiliary_driver) \
|
||||
module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister)
|
||||
|
|
Loading…
Reference in a new issue