aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/serio.h')
-rw-r--r--include/linux/serio.h20
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);
79irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags); 79irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags);
80 80
81void __serio_register_port(struct serio *serio, struct module *owner); 81void __serio_register_port(struct serio *serio, struct module *owner);
82static 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
87void serio_unregister_port(struct serio *serio); 87void serio_unregister_port(struct serio *serio);
88void serio_unregister_child_port(struct serio *serio); 88void serio_unregister_child_port(struct serio *serio);
89 89
90int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name); 90int __must_check __serio_register_driver(struct serio_driver *drv,
91static 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
95void serio_unregister_driver(struct serio_driver *drv); 97void serio_unregister_driver(struct serio_driver *drv);
96 98
97static inline int serio_write(struct serio *serio, unsigned char data) 99static inline int serio_write(struct serio *serio, unsigned char data)