summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-01-05 17:56:03 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-01-06 00:23:51 -0800
commit361b7b5b032338361ea88412f1fc45479fdd5859 (patch)
treeaed4cc96a50f563a3adc1521d109269809a5b60f /drivers
parentcac9169bf75ea8cbaab75be9dbe5eb79a2bad6f5 (diff)
downloadtalos-obmc-linux-361b7b5b032338361ea88412f1fc45479fdd5859.tar.gz
talos-obmc-linux-361b7b5b032338361ea88412f1fc45479fdd5859.zip
Input: gameport - let device core tell us if device was registered
No need to keep track of it by ourselves. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/gameport/gameport.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index ac11be08585e..f9e5f8e1690b 100644
--- a/drivers/input/gameport/gameport.c
+++ b/drivers/input/gameport/gameport.c
@@ -561,8 +561,6 @@ static void gameport_add_port(struct gameport *gameport)
printk(KERN_ERR
"gameport: device_add() failed for %s (%s), error: %d\n",
gameport->phys, gameport->name, error);
- else
- gameport->registered = 1;
}
/*
@@ -584,10 +582,8 @@ static void gameport_destroy_port(struct gameport *gameport)
gameport->parent = NULL;
}
- if (gameport->registered) {
+ if (device_is_registered(&gameport->dev))
device_del(&gameport->dev);
- gameport->registered = 0;
- }
list_del_init(&gameport->node);
OpenPOWER on IntegriCloud