Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43dc4470 authored by Lee Jones's avatar Lee Jones
Browse files

ab8500_btemp: Fix crazy tabbing implementation



Simple patch to rectify incorrect tabbing. Also adds some
coding style clean-ups to make it easier to read.

Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent f6271b4f
Loading
Loading
Loading
Loading
+229 −228
Original line number Diff line number Diff line
@@ -452,8 +452,7 @@ struct abx500_bm_data ab8500_bm_data = {
	.fg_params              = &fg,
};

int __devinit
bmdevs_of_probe(struct device *dev,
int __devinit bmdevs_of_probe(struct device *dev,
			      struct device_node *np,
			      struct abx500_bm_data **battery)
{
@@ -471,8 +470,8 @@ bmdevs_of_probe(struct device *dev,
		dev_err(dev, "missing property battery\n");
		return -EINVAL;
	}
	if (of_property_read_bool(np_bat_supply,
			"thermistor-on-batctrl"))

	if (of_property_read_bool(np_bat_supply, "thermistor-on-batctrl"))
		thermistor = NTC_INTERNAL;
	else
		thermistor = NTC_EXTERNAL;
@@ -483,8 +482,8 @@ bmdevs_of_probe(struct device *dev,
		bat->bat_type  = bat_type_ext_thermistor;
		bat->adc_therm = ABx500_ADC_THERM_BATTEMP;
	}
	btech = of_get_property(np_bat_supply,
		"stericsson,battery-type", NULL);

	btech = of_get_property(np_bat_supply, "stericsson,battery-type", NULL);
	if (!btech) {
		dev_warn(dev, "missing property battery-name/type\n");
		return -EINVAL;
@@ -498,6 +497,7 @@ bmdevs_of_probe(struct device *dev,
		bat->bat_type[BATTERY_UNKNOWN].normal_cur_lvl	  = 520;
		bat->bat_type[BATTERY_UNKNOWN].normal_vol_lvl	  = 4200;
	}

	/* select the battery resolution table */
	for (i = 0; i < bat->n_btypes; ++i) {
		btype = (bat->bat_type + i);
@@ -513,5 +513,6 @@ bmdevs_of_probe(struct device *dev,
		}
	}
	of_node_put(np_bat_supply);

	return 0;
}