Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39661
b: refs/heads/master
c: 23de151
h: refs/heads/master
i:
  39659: 58dea5b
v: v3
  • Loading branch information
Dmitry Torokhov committed Oct 12, 2006
1 parent a8bcaa9 commit 616071a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a66045bcfd3a7ba5d1253f9f305b78bf636ac57
refs/heads/master: 23de1510e2468ea349354889097e018d4e8770c5
18 changes: 16 additions & 2 deletions trunk/drivers/input/gameport/gameport.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,29 @@ static void gameport_run_poll_handler(unsigned long d)

static void gameport_bind_driver(struct gameport *gameport, struct gameport_driver *drv)
{
int error;

down_write(&gameport_bus.subsys.rwsem);

gameport->dev.driver = &drv->driver;
if (drv->connect(gameport, drv)) {
gameport->dev.driver = NULL;
goto out;
}
device_bind_driver(&gameport->dev);
out:

error = device_bind_driver(&gameport->dev);
if (error) {
printk(KERN_WARNING
"gameport: device_bind_driver() failed "
"for %s (%s) and %s, error: %d\n",
gameport->phys, gameport->name,
drv->description, error);
drv->disconnect(gameport);
gameport->dev.driver = NULL;
goto out;
}

out:
up_write(&gameport_bus.subsys.rwsem);
}

Expand Down

0 comments on commit 616071a

Please sign in to comment.