Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344497
b: refs/heads/master
c: 2f05e1d
h: refs/heads/master
i:
  344495: 66a36e7
v: v3
  • Loading branch information
Dan Carpenter authored and Bryan Wu committed Dec 3, 2012
1 parent a088f0f commit 4b35140
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 5c6f844cee2139182b3a778f2a883a77e5bb8f7d
refs/heads/master: 2f05e1d4458f9cb68d4d36fb47e6830fec03c80e
9 changes: 8 additions & 1 deletion trunk/drivers/leds/leds-lp5521.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,17 @@ static int __devinit lp5521_probe(struct i2c_client *client,
* LP5521_REG_ENABLE register will not have any effect - strange!
*/
ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
if (ret || buf != LP5521_REG_R_CURR_DEFAULT) {
if (ret) {
dev_err(&client->dev, "error in resetting chip\n");
goto fail2;
}
if (buf != LP5521_REG_R_CURR_DEFAULT) {
dev_err(&client->dev,
"unexpected data in register (expected 0x%x got 0x%x)\n",
LP5521_REG_R_CURR_DEFAULT, buf);
ret = -EINVAL;
goto fail2;
}
usleep_range(10000, 20000);

ret = lp5521_detect(client);
Expand Down

0 comments on commit 4b35140

Please sign in to comment.