aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/gameport
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/gameport')
-rw-r--r--drivers/input/gameport/gameport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index e29c04e2aff4..e853a2134680 100644
--- a/drivers/input/gameport/gameport.c
+++ b/drivers/input/gameport/gameport.c
@@ -527,14 +527,14 @@ EXPORT_SYMBOL(gameport_set_phys);
527 */ 527 */
528static void gameport_init_port(struct gameport *gameport) 528static void gameport_init_port(struct gameport *gameport)
529{ 529{
530 static atomic_t gameport_no = ATOMIC_INIT(0); 530 static atomic_t gameport_no = ATOMIC_INIT(-1);
531 531
532 __module_get(THIS_MODULE); 532 __module_get(THIS_MODULE);
533 533
534 mutex_init(&gameport->drv_mutex); 534 mutex_init(&gameport->drv_mutex);
535 device_initialize(&gameport->dev); 535 device_initialize(&gameport->dev);
536 dev_set_name(&gameport->dev, "gameport%lu", 536 dev_set_name(&gameport->dev, "gameport%lu",
537 (unsigned long)atomic_inc_return(&gameport_no) - 1); 537 (unsigned long)atomic_inc_return(&gameport_no));
538 gameport->dev.bus = &gameport_bus; 538 gameport->dev.bus = &gameport_bus;
539 gameport->dev.release = gameport_release_port; 539 gameport->dev.release = gameport_release_port;
540 if (gameport->parent) 540 if (gameport->parent)