diff options
Diffstat (limited to 'include/linux/gameport.h')
-rw-r--r-- | include/linux/gameport.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index b65a6f472775..e74073e9dd8d 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -71,10 +71,9 @@ void gameport_close(struct gameport *gameport); | |||
71 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) | 71 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) |
72 | 72 | ||
73 | void __gameport_register_port(struct gameport *gameport, struct module *owner); | 73 | void __gameport_register_port(struct gameport *gameport, struct module *owner); |
74 | static inline void gameport_register_port(struct gameport *gameport) | 74 | /* use a define to avoid include chaining to get THIS_MODULE */ |
75 | { | 75 | #define gameport_register_port(gameport) \ |
76 | __gameport_register_port(gameport, THIS_MODULE); | 76 | __gameport_register_port(gameport, THIS_MODULE) |
77 | } | ||
78 | 77 | ||
79 | void gameport_unregister_port(struct gameport *gameport); | 78 | void gameport_unregister_port(struct gameport *gameport); |
80 | 79 | ||
@@ -145,12 +144,12 @@ static inline void gameport_unpin_driver(struct gameport *gameport) | |||
145 | mutex_unlock(&gameport->drv_mutex); | 144 | mutex_unlock(&gameport->drv_mutex); |
146 | } | 145 | } |
147 | 146 | ||
148 | int __gameport_register_driver(struct gameport_driver *drv, | 147 | int __must_check __gameport_register_driver(struct gameport_driver *drv, |
149 | struct module *owner, const char *mod_name); | 148 | struct module *owner, const char *mod_name); |
150 | static inline int __must_check gameport_register_driver(struct gameport_driver *drv) | 149 | |
151 | { | 150 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
152 | return __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | 151 | #define gameport_register_driver(drv) \ |
153 | } | 152 | __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) |
154 | 153 | ||
155 | void gameport_unregister_driver(struct gameport_driver *drv); | 154 | void gameport_unregister_driver(struct gameport_driver *drv); |
156 | 155 | ||