Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350590
b: refs/heads/master
c: 215cf5c
h: refs/heads/master
v: v3
  • Loading branch information
Lee Jones committed Dec 11, 2012
1 parent 608de99 commit 7d102a9
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: bdc56b44038e1472d24c9195337226b8d6f2961e
refs/heads/master: 215cf5c93d2deda4df38d0c9b2429ab2e86808a5
12 changes: 6 additions & 6 deletions trunk/drivers/power/ab8500_bmdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,18 +457,18 @@ int __devinit ab8500_bm_of_probe(struct device *dev,
struct abx500_bm_data *bm)
{
struct batres_vs_temp *tmp_batres_tbl;
struct device_node *np_bat_supply;
struct device_node *battery_node;
const char *btech;
int i;

/* get phandle to 'battery-info' node */
np_bat_supply = of_parse_phandle(np, "battery", 0);
if (!np_bat_supply) {
battery_node = of_parse_phandle(np, "battery", 0);
if (!battery_node) {
dev_err(dev, "battery node or reference missing\n");
return -EINVAL;
}

btech = of_get_property(np_bat_supply, "stericsson,battery-type", NULL);
btech = of_get_property(battery_node, "stericsson,battery-type", NULL);
if (!btech) {
dev_warn(dev, "missing property battery-name/type\n");
return -EINVAL;
Expand All @@ -484,7 +484,7 @@ int __devinit ab8500_bm_of_probe(struct device *dev,
bm->bat_type[BATTERY_UNKNOWN].normal_vol_lvl = 4200;
}

if (of_property_read_bool(np_bat_supply, "thermistor-on-batctrl")) {
if (of_property_read_bool(battery_node, "thermistor-on-batctrl")) {
if (strncmp(btech, "LION", 4) == 0)
tmp_batres_tbl = temp_to_batres_tbl_9100;
else
Expand All @@ -500,7 +500,7 @@ int __devinit ab8500_bm_of_probe(struct device *dev,
for (i = 0; i < bm->n_btypes; ++i)
bm->bat_type[i].batres_tbl = tmp_batres_tbl;

of_node_put(np_bat_supply);
of_node_put(battery_node);

return 0;
}

0 comments on commit 7d102a9

Please sign in to comment.