aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-11-30 06:38:52 -0500
committerLee Jones <lee.jones@linaro.org>2012-12-11 03:43:55 -0500
commit215cf5c93d2deda4df38d0c9b2429ab2e86808a5 (patch)
tree3566d5ea935540c57e83fc7c91a97ff97c7c2d05
parentbdc56b44038e1472d24c9195337226b8d6f2961e (diff)
ab8500_bm: Make the battery Device Tree node reference less cryptic
Let's rename the Device Tree node which contains information about an attached battery to something more easily readable. Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/power/ab8500_bmdata.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/power/ab8500_bmdata.c b/drivers/power/ab8500_bmdata.c
index 6b772e5f515f..0bf52369d6a5 100644
--- a/drivers/power/ab8500_bmdata.c
+++ b/drivers/power/ab8500_bmdata.c
@@ -457,18 +457,18 @@ int __devinit ab8500_bm_of_probe(struct device *dev,
457 struct abx500_bm_data *bm) 457 struct abx500_bm_data *bm)
458{ 458{
459 struct batres_vs_temp *tmp_batres_tbl; 459 struct batres_vs_temp *tmp_batres_tbl;
460 struct device_node *np_bat_supply; 460 struct device_node *battery_node;
461 const char *btech; 461 const char *btech;
462 int i; 462 int i;
463 463
464 /* get phandle to 'battery-info' node */ 464 /* get phandle to 'battery-info' node */
465 np_bat_supply = of_parse_phandle(np, "battery", 0); 465 battery_node = of_parse_phandle(np, "battery", 0);
466 if (!np_bat_supply) { 466 if (!battery_node) {
467 dev_err(dev, "battery node or reference missing\n"); 467 dev_err(dev, "battery node or reference missing\n");
468 return -EINVAL; 468 return -EINVAL;
469 } 469 }
470 470
471 btech = of_get_property(np_bat_supply, "stericsson,battery-type", NULL); 471 btech = of_get_property(battery_node, "stericsson,battery-type", NULL);
472 if (!btech) { 472 if (!btech) {
473 dev_warn(dev, "missing property battery-name/type\n"); 473 dev_warn(dev, "missing property battery-name/type\n");
474 return -EINVAL; 474 return -EINVAL;
@@ -484,7 +484,7 @@ int __devinit ab8500_bm_of_probe(struct device *dev,
484 bm->bat_type[BATTERY_UNKNOWN].normal_vol_lvl = 4200; 484 bm->bat_type[BATTERY_UNKNOWN].normal_vol_lvl = 4200;
485 } 485 }
486 486
487 if (of_property_read_bool(np_bat_supply, "thermistor-on-batctrl")) { 487 if (of_property_read_bool(battery_node, "thermistor-on-batctrl")) {
488 if (strncmp(btech, "LION", 4) == 0) 488 if (strncmp(btech, "LION", 4) == 0)
489 tmp_batres_tbl = temp_to_batres_tbl_9100; 489 tmp_batres_tbl = temp_to_batres_tbl_9100;
490 else 490 else
@@ -500,7 +500,7 @@ int __devinit ab8500_bm_of_probe(struct device *dev,
500 for (i = 0; i < bm->n_btypes; ++i) 500 for (i = 0; i < bm->n_btypes; ++i)
501 bm->bat_type[i].batres_tbl = tmp_batres_tbl; 501 bm->bat_type[i].batres_tbl = tmp_batres_tbl;
502 502
503 of_node_put(np_bat_supply); 503 of_node_put(battery_node);
504 504
505 return 0; 505 return 0;
506} 506}