Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39660
b: refs/heads/master
c: 0a66045
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Oct 12, 2006
1 parent 58dea5b commit a8bcaa9
Show file tree
Hide file tree
Showing 2 changed files with 15 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: 07646e217f473a3e6213f8228336a9046833d6aa
refs/heads/master: 0a66045bcfd3a7ba5d1253f9f305b78bf636ac57
16 changes: 14 additions & 2 deletions trunk/drivers/input/serio/serio.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ static int serio_match_port(const struct serio_device_id *ids, struct serio *ser

static void serio_bind_driver(struct serio *serio, struct serio_driver *drv)
{
int error;

down_write(&serio_bus.subsys.rwsem);

if (serio_match_port(drv->id_table, serio)) {
Expand All @@ -126,9 +128,19 @@ static void serio_bind_driver(struct serio *serio, struct serio_driver *drv)
serio->dev.driver = NULL;
goto out;
}
device_bind_driver(&serio->dev);
error = device_bind_driver(&serio->dev);
if (error) {
printk(KERN_WARNING
"serio: device_bind_driver() failed "
"for %s (%s) and %s, error: %d\n",
serio->phys, serio->name,
drv->description, error);
serio_disconnect_driver(serio);
serio->dev.driver = NULL;
goto out;
}
}
out:
out:
up_write(&serio_bus.subsys.rwsem);
}

Expand Down

0 comments on commit a8bcaa9

Please sign in to comment.