summaryrefslogtreecommitdiff
path: root/include/linux/gameport.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-06-06 09:33:22 +0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-07-30 08:41:15 +0400
commit6902c0bead4ce266226fc0c5b3828b850bdc884a (patch)
treec3e8e280e56089dc4e9f4410128e17c8de0f8bee /include/linux/gameport.h
parent6e86841d05f371b5b9b86ce76c02aaee83352298 (diff)
downloadlinux-6902c0bead4ce266226fc0c5b3828b850bdc884a.tar.xz
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.h7
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)
mutex_unlock(&gameport->drv_mutex);
}
-void __gameport_register_driver(struct gameport_driver *drv, struct module *owner);
-static inline void gameport_register_driver(struct gameport_driver *drv)
+int __gameport_register_driver(struct gameport_driver *drv,
+ struct module *owner, const char *mod_name);
+static inline int gameport_register_driver(struct gameport_driver *drv)
{
- __gameport_register_driver(drv, THIS_MODULE);
+ return __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME);
}
void gameport_unregister_driver(struct gameport_driver *drv);