diff options
Diffstat (limited to 'include/linux/serio.h')
-rw-r--r-- | include/linux/serio.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/include/linux/serio.h b/include/linux/serio.h index be7dfb0f12d0..ca82861b0e46 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -79,19 +79,21 @@ void serio_reconnect(struct serio *serio); | |||
79 | irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags); | 79 | irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags); |
80 | 80 | ||
81 | void __serio_register_port(struct serio *serio, struct module *owner); | 81 | void __serio_register_port(struct serio *serio, struct module *owner); |
82 | static inline void serio_register_port(struct serio *serio) | 82 | |
83 | { | 83 | /* use a define to avoid include chaining to get THIS_MODULE */ |
84 | __serio_register_port(serio, THIS_MODULE); | 84 | #define serio_register_port(serio) \ |
85 | } | 85 | __serio_register_port(serio, THIS_MODULE) |
86 | 86 | ||
87 | void serio_unregister_port(struct serio *serio); | 87 | void serio_unregister_port(struct serio *serio); |
88 | void serio_unregister_child_port(struct serio *serio); | 88 | void serio_unregister_child_port(struct serio *serio); |
89 | 89 | ||
90 | int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name); | 90 | int __must_check __serio_register_driver(struct serio_driver *drv, |
91 | static inline int __must_check serio_register_driver(struct serio_driver *drv) | 91 | struct module *owner, const char *mod_name); |
92 | { | 92 | |
93 | return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | 93 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
94 | } | 94 | #define serio_register_driver(drv) \ |
95 | __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) | ||
96 | |||
95 | void serio_unregister_driver(struct serio_driver *drv); | 97 | void serio_unregister_driver(struct serio_driver *drv); |
96 | 98 | ||
97 | static inline int serio_write(struct serio *serio, unsigned char data) | 99 | static inline int serio_write(struct serio *serio, unsigned char data) |