Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330492
b: refs/heads/master
c: a22b41a
h: refs/heads/master
v: v3
  • Loading branch information
Olof Johansson authored and Anton Vorontsov committed Sep 20, 2012
1 parent e80c0bf commit ef415b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1502cfe19bac2f8490e4167f2b7cb50b9759b273
refs/heads/master: a22b41a31e5382792151f193d185a3cd39593cfd
10 changes: 10 additions & 0 deletions trunk/drivers/power/sbs-battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,16 @@ static int __devinit sbs_probe(struct i2c_client *client,
chip->irq = irq;

skip_gpio:
/*
* Before we register, we need to make sure we can actually talk
* to the battery.
*/
rc = sbs_read_word_data(client, sbs_data[REG_STATUS].addr);
if (rc < 0) {
dev_err(&client->dev, "%s: Failed to get device status\n",
__func__);
goto exit_psupply;
}

rc = power_supply_register(&client->dev, &chip->power_supply);
if (rc) {
Expand Down

0 comments on commit ef415b4

Please sign in to comment.