Commit 31381042 authored by Pavel Machek's avatar Pavel Machek Committed by Sebastian Reichel

bq24190: Simplify code in property_is_writeable

Simplify function that should be trivial.
Signed-off-by: default avatarPavel machek <pavel@ucw.cz>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parent 331645e1
...@@ -1199,8 +1199,6 @@ static int bq24190_charger_set_property(struct power_supply *psy, ...@@ -1199,8 +1199,6 @@ static int bq24190_charger_set_property(struct power_supply *psy,
static int bq24190_charger_property_is_writeable(struct power_supply *psy, static int bq24190_charger_property_is_writeable(struct power_supply *psy,
enum power_supply_property psp) enum power_supply_property psp)
{ {
int ret;
switch (psp) { switch (psp) {
case POWER_SUPPLY_PROP_ONLINE: case POWER_SUPPLY_PROP_ONLINE:
case POWER_SUPPLY_PROP_TEMP_ALERT_MAX: case POWER_SUPPLY_PROP_TEMP_ALERT_MAX:
...@@ -1208,13 +1206,10 @@ static int bq24190_charger_property_is_writeable(struct power_supply *psy, ...@@ -1208,13 +1206,10 @@ static int bq24190_charger_property_is_writeable(struct power_supply *psy,
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT: case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT:
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE: case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE:
case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT:
ret = 1; return 1;
break;
default: default:
ret = 0; return 0;
} }
return ret;
} }
static void bq24190_input_current_limit_work(struct work_struct *work) static void bq24190_input_current_limit_work(struct work_struct *work)
......
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