diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-06-06 01:33:22 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-07-30 00:41:15 -0400 |
commit | 6902c0bead4ce266226fc0c5b3828b850bdc884a (patch) | |
tree | c3e8e280e56089dc4e9f4410128e17c8de0f8bee /include/linux/gameport.h | |
parent | 6e86841d05f371b5b9b86ce76c02aaee83352298 (diff) |
Input: gameport - make gameport_register_driver() return errors
Perform actual driver registration right in gameport_register_driver()
instead of offloading it to kgameportd and return proper error code to
callers if driver registration fails.
Note that driver <-> port matching is still done by kgameportd.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/gameport.h')
-rw-r--r-- | include/linux/gameport.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index f64e29c0ef3f..5126125afd4e 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -146,10 +146,11 @@ static inline void gameport_unpin_driver(struct gameport *gameport) | |||
146 | mutex_unlock(&gameport->drv_mutex); | 146 | mutex_unlock(&gameport->drv_mutex); |
147 | } | 147 | } |
148 | 148 | ||
149 | void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); | 149 | int __gameport_register_driver(struct gameport_driver *drv, |
150 | static inline void gameport_register_driver(struct gameport_driver *drv) | 150 | struct module *owner, const char *mod_name); |
151 | static inline int gameport_register_driver(struct gameport_driver *drv) | ||
151 | { | 152 | { |
152 | __gameport_register_driver(drv, THIS_MODULE); | 153 | return __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); |
153 | } | 154 | } |
154 | 155 | ||
155 | void gameport_unregister_driver(struct gameport_driver *drv); | 156 | void gameport_unregister_driver(struct gameport_driver *drv); |