Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283425
b: refs/heads/master
c: 4cfa892
h: refs/heads/master
i:
  283423: 2747263
v: v3
  • Loading branch information
Philip Rakity authored and Anton Vorontsov committed Aug 19, 2011
1 parent 400328a commit 6fc456a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 45d116ec2503c4255374e11c2c48f81cdf6d0f1d
refs/heads/master: 4cfa892c03b35f3c61d93e0d8d97ff8db074818f
6 changes: 3 additions & 3 deletions trunk/drivers/power/max17042_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ static int __devinit max17042_probe(struct i2c_client *client,
if (!chip->pdata->enable_current_sense)
chip->battery.num_properties -= 2;

if (chip->pdata->r_sns == 0)
chip->pdata->r_sns = MAX17042_DEFAULT_SNS_RESISTOR;

ret = power_supply_register(&client->dev, &chip->battery);
if (ret) {
dev_err(&client->dev, "failed: power supply register\n");
Expand All @@ -225,9 +228,6 @@ static int __devinit max17042_probe(struct i2c_client *client,
max17042_write_reg(client, MAX17042_CGAIN, 0x0000);
max17042_write_reg(client, MAX17042_MiscCFG, 0x0003);
max17042_write_reg(client, MAX17042_LearnCFG, 0x0007);
} else {
if (chip->pdata->r_sns == 0)
chip->pdata->r_sns = MAX17042_DEFAULT_SNS_RESISTOR;
}

return 0;
Expand Down

0 comments on commit 6fc456a

Please sign in to comment.