summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/power/supply/bq24190_charger.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 19f5c61a2986..906b572c708f 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -751,10 +751,6 @@ static int bq24190_set_config(struct bq24190_dev_info *bdi)
int ret;
u8 v;
- ret = bq24190_read(bdi, BQ24190_REG_CTTC, &v);
- if (ret < 0)
- return ret;
-
/*
* According to the "Host Mode and default Mode" section of the
* manual, a write to any register causes the bq24190 to switch
@@ -763,9 +759,9 @@ static int bq24190_set_config(struct bq24190_dev_info *bdi)
* So, by simply turning off the WDT, we accomplish both with the
* same write.
*/
- v &= ~BQ24190_REG_CTTC_WATCHDOG_MASK;
-
- ret = bq24190_write(bdi, BQ24190_REG_CTTC, v);
+ ret = bq24190_write_mask(bdi, BQ24190_REG_CTTC,
+ BQ24190_REG_CTTC_WATCHDOG_MASK,
+ BQ24190_REG_CTTC_WATCHDOG_SHIFT, 0);
if (ret < 0)
return ret;