diff options
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/iforce/iforce-main.c | 14 | ||||
-rw-r--r-- | drivers/input/joystick/magellan.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/spaceball.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/spaceorb.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/stinger.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/twidjoy.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/warrior.c | 3 |
7 files changed, 17 insertions, 15 deletions
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index 706e0aea793c..3393a37fec39 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -467,13 +467,21 @@ int iforce_init_device(struct iforce *iforce) static int __init iforce_init(void) { + int err = 0; + #ifdef CONFIG_JOYSTICK_IFORCE_USB - usb_register(&iforce_usb_driver); + err = usb_register(&iforce_usb_driver); + if (err) + return err; #endif #ifdef CONFIG_JOYSTICK_IFORCE_232 - serio_register_driver(&iforce_serio_drv); + err = serio_register_driver(&iforce_serio_drv); +#ifdef CONFIG_JOYSTICK_IFORCE_USB + if (err) + usb_deregister(&iforce_usb_driver); #endif - return 0; +#endif + return err; } static void __exit iforce_exit(void) diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c index d512b0a0282e..4112789f1196 100644 --- a/drivers/input/joystick/magellan.c +++ b/drivers/input/joystick/magellan.c @@ -231,8 +231,7 @@ static struct serio_driver magellan_drv = { static int __init magellan_init(void) { - serio_register_driver(&magellan_drv); - return 0; + return serio_register_driver(&magellan_drv); } static void __exit magellan_exit(void) diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c index 9b3597343c1c..08bf113e62eb 100644 --- a/drivers/input/joystick/spaceball.c +++ b/drivers/input/joystick/spaceball.c @@ -300,8 +300,7 @@ static struct serio_driver spaceball_drv = { static int __init spaceball_init(void) { - serio_register_driver(&spaceball_drv); - return 0; + return serio_register_driver(&spaceball_drv); } static void __exit spaceball_exit(void) diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c index ea9d51e70a12..c9c79211af71 100644 --- a/drivers/input/joystick/spaceorb.c +++ b/drivers/input/joystick/spaceorb.c @@ -246,8 +246,7 @@ static struct serio_driver spaceorb_drv = { static int __init spaceorb_init(void) { - serio_register_driver(&spaceorb_drv); - return 0; + return serio_register_driver(&spaceorb_drv); } static void __exit spaceorb_exit(void) diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c index b51a4a4c7f60..ecb0916215fa 100644 --- a/drivers/input/joystick/stinger.c +++ b/drivers/input/joystick/stinger.c @@ -216,8 +216,7 @@ static struct serio_driver stinger_drv = { static int __init stinger_init(void) { - serio_register_driver(&stinger_drv); - return 0; + return serio_register_driver(&stinger_drv); } static void __exit stinger_exit(void) diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c index 3c1c83e8609a..9cf17d6ced82 100644 --- a/drivers/input/joystick/twidjoy.c +++ b/drivers/input/joystick/twidjoy.c @@ -269,8 +269,7 @@ static struct serio_driver twidjoy_drv = { static int __init twidjoy_init(void) { - serio_register_driver(&twidjoy_drv); - return 0; + return serio_register_driver(&twidjoy_drv); } static void __exit twidjoy_exit(void) diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index 1e4828b9a1ab..29d339acf430 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c @@ -224,8 +224,7 @@ static struct serio_driver warrior_drv = { static int __init warrior_init(void) { - serio_register_driver(&warrior_drv); - return 0; + return serio_register_driver(&warrior_drv); } static void __exit warrior_exit(void) |