Commit ed59828b authored by Rajanikanth H.V's avatar Rajanikanth H.V Committed by Anton Vorontsov

ab8500: Remove initial "UNKNOWN" battery-type string assignment

DT property 'stericsson,battery-type' shall be one of supported technology
type
Signed-off-by: default avatarRajanikanth H.V <rajanikanth.hv@stericsson.com>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent d1c3ed66
...@@ -461,7 +461,6 @@ bmdevs_of_probe(struct device *dev, ...@@ -461,7 +461,6 @@ bmdevs_of_probe(struct device *dev,
struct device_node *np_bat_supply; struct device_node *np_bat_supply;
struct abx500_bm_data *bat; struct abx500_bm_data *bat;
const char *btech; const char *btech;
char bat_tech[8];
int i, thermistor; int i, thermistor;
*battery = &ab8500_bm_data; *battery = &ab8500_bm_data;
...@@ -488,12 +487,10 @@ bmdevs_of_probe(struct device *dev, ...@@ -488,12 +487,10 @@ bmdevs_of_probe(struct device *dev,
"stericsson,battery-type", NULL); "stericsson,battery-type", NULL);
if (!btech) { if (!btech) {
dev_warn(dev, "missing property battery-name/type\n"); dev_warn(dev, "missing property battery-name/type\n");
strcpy(bat_tech, "UNKNOWN"); of_node_put(np_bat_supply);
} else { return -EINVAL;
strcpy(bat_tech, btech);
} }
if (strncmp(btech, "LION", 4) == 0) {
if (strncmp(bat_tech, "LION", 4) == 0) {
bat->no_maintenance = true; bat->no_maintenance = true;
bat->chg_unknown_bat = true; bat->chg_unknown_bat = true;
bat->bat_type[BATTERY_UNKNOWN].charge_full_design = 2600; bat->bat_type[BATTERY_UNKNOWN].charge_full_design = 2600;
...@@ -508,7 +505,7 @@ bmdevs_of_probe(struct device *dev, ...@@ -508,7 +505,7 @@ bmdevs_of_probe(struct device *dev,
if (thermistor == NTC_EXTERNAL) { if (thermistor == NTC_EXTERNAL) {
btype->batres_tbl = btype->batres_tbl =
temp_to_batres_tbl_ext_thermistor; temp_to_batres_tbl_ext_thermistor;
} else if (strncmp(bat_tech, "LION", 4) == 0) { } else if (strncmp(btech, "LION", 4) == 0) {
btype->batres_tbl = btype->batres_tbl =
temp_to_batres_tbl_9100; temp_to_batres_tbl_9100;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment