Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357587
b: refs/heads/master
c: 6382a06
h: refs/heads/master
i:
  357585: b45b6f9
  357583: d43b304
v: v3
  • Loading branch information
Peter Ujfalusi authored and Samuel Ortiz committed Feb 13, 2013
1 parent dd1d084 commit e212f4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 7e2e6c5758de94ec22686b30e7b906a3ddcd9896
refs/heads/master: 6382a0614144901af1cbbfdf9b9a618f5dfb8548
12 changes: 6 additions & 6 deletions trunk/drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,12 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
return -EINVAL;
}

if (inuse) {
dev_dbg(&client->dev, "only one instance of %s allowed\n",
DRIVER_NAME);
return -EBUSY;
}

pdev = platform_device_alloc(DRIVER_NAME, -1);
if (!pdev) {
dev_err(&client->dev, "can't alloc pdev\n");
Expand All @@ -1188,12 +1194,6 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
goto free;
}

if (inuse) {
dev_dbg(&client->dev, "driver is already in use\n");
status = -EBUSY;
goto free;
}

if ((id->driver_data) & TWL6030_CLASS) {
twl_id = TWL6030_CLASS_ID;
twl_map = &twl6030_map[0];
Expand Down

0 comments on commit e212f4f

Please sign in to comment.