Skip to content

Commit 68961bb

Browse files
committed
drivers/power/supply/tssilo_supercaps.c: Fix if statements according to style guide.
1 parent 9f721d8 commit 68961bb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/power/supply/tssilo_supercaps.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,15 @@ static int silo_set_property(struct power_supply *psy,
259259
if (val->intval < 0 || val->intval > value)
260260
return -EINVAL;
261261
ret = regmap_write(data->regmap, SILO_REQUESTED_CHG_CURRENT_MA, val->intval);
262-
} else if (psp == POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN)
262+
} else if (psp == POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN) {
263263
ret = regmap_write(data->regmap, SILO_CRITICAL_PCT, val->intval);
264-
else if (psp == POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR) {
264+
} else if (psp == POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR) {
265265
value = ((val->intval == POWER_SUPPLY_CHARGE_BEHAVIOUR_AUTO) ? SILO_CONTROL_CHRG_EN : 0);
266266
ret = regmap_update_bits(data->regmap, SILO_CONTROL,
267267
SILO_CONTROL_CHRG_EN, value);
268-
} else
268+
} else {
269269
return -EINVAL;
270+
}
270271

271272
if (!ret)
272273
power_supply_changed(data->psy);

0 commit comments

Comments
 (0)