Changeset 615 for GPL/branches/uniaud32-next/include/linux/module.h
- Timestamp:
- Jan 1, 2021, 5:31:48 AM (5 years ago)
- Location:
- GPL/branches/uniaud32-next
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/include/linux/module.h
r598 r615 7 7 #ifndef _LINUX_MODULE_H 8 8 #define _LINUX_MODULE_H 9 9 #include <linux/moduleparam.h> 10 10 /* Poke the use count of a module. */ 11 11 … … 78 78 #define MODULE_ALIAS_CHARDEV(x) 79 79 #define module_param(name, type, perm) 80 81 /** 82 * module_driver() - Helper macro for drivers that don't do anything 83 * special in module init/exit. This eliminates a lot of boilerplate. 84 * Each module may only use this macro once, and calling it replaces 85 * module_init() and module_exit(). 86 * 87 * @__driver: driver name 88 * @__register: register function for this driver type 89 * @__unregister: unregister function for this driver type 90 * @...: Additional arguments to be passed to __register and __unregister. 91 * 92 * Use this macro to construct bus specific macros for registering 93 * drivers, and do not use it on its own. 94 */ 95 #define module_driver(__driver, __register, __unregister, ...) \ 96 static int __init __driver##_init(void) \ 97 { \ 98 return __register(&__driver, ##__VA_ARGS__); \ 99 } \ 100 module_init(__driver##_init); \ 101 static void __exit __driver##_exit(void) \ 102 { \ 103 __unregister(&__driver, ##__VA_ARGS__); \ 104 } \ 105 module_exit(__driver##_exit); 106 #define symbol_put_addr(p) do { } while (0) 107 #define postcore_initcall(fn) module_init(fn) 108 109 #define MODULE_NAME_LEN 255 110 111 struct module { 112 /* Unique handle for this module */ 113 char name[MODULE_NAME_LEN]; 114 }; 80 115 #endif /* _LINUX_MODULE_H */
Note:
See TracChangeset
for help on using the changeset viewer.