From: Peter Rosin Date: Tue, 13 Dec 2016 23:56:43 +0000 (+0100) Subject: power: supply: bq24735-charger: simplify register update to stop charging X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d0ddcba9e9dea9b5d43782da096489b15ffca99f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git power: supply: bq24735-charger: simplify register update to stop charging Providing value bits outside of the mask is pointless. Signed-off-by: Peter Rosin Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/bq24735-charger.c b/drivers/power/supply/bq24735-charger.c index eb7783b42e0a..1d5c9206e0ed 100644 --- a/drivers/power/supply/bq24735-charger.c +++ b/drivers/power/supply/bq24735-charger.c @@ -111,8 +111,7 @@ static inline int bq24735_enable_charging(struct bq24735 *charger) return 0; return bq24735_update_word(charger->client, BQ24735_CHG_OPT, - BQ24735_CHG_OPT_CHARGE_DISABLE, - ~BQ24735_CHG_OPT_CHARGE_DISABLE); + BQ24735_CHG_OPT_CHARGE_DISABLE, 0); } static inline int bq24735_disable_charging(struct bq24735 *charger)