diff options
-rw-r--r-- | include/linux/serio.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/serio.h b/include/linux/serio.h index ca82861b0e46..6d6cfd3e94a3 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -96,6 +96,19 @@ int __must_check __serio_register_driver(struct serio_driver *drv, | |||
96 | 96 | ||
97 | void serio_unregister_driver(struct serio_driver *drv); | 97 | void serio_unregister_driver(struct serio_driver *drv); |
98 | 98 | ||
99 | /** | ||
100 | * module_serio_driver() - Helper macro for registering a serio driver | ||
101 | * @__serio_driver: serio_driver struct | ||
102 | * | ||
103 | * Helper macro for serio drivers which do not do anything special in | ||
104 | * module init/exit. This eliminates a lot of boilerplate. Each module | ||
105 | * may only use this macro once, and calling it replaces module_init() | ||
106 | * and module_exit(). | ||
107 | */ | ||
108 | #define module_serio_driver(__serio_driver) \ | ||
109 | module_driver(__serio_driver, serio_register_driver, \ | ||
110 | serio_unregister_driver) | ||
111 | |||
99 | static inline int serio_write(struct serio *serio, unsigned char data) | 112 | static inline int serio_write(struct serio *serio, unsigned char data) |
100 | { | 113 | { |
101 | if (serio->write) | 114 | if (serio->write) |