power: supply: ab8500_fg: remove comparison to bool
authorJason Yan <yanaijie@huawei.com>
Sun, 26 Apr 2020 09:42:50 +0000 (17:42 +0800)
committerSebastian Reichel <sre@kernel.org>
Tue, 28 Apr 2020 19:18:47 +0000 (21:18 +0200)
Fix the following coccicheck warning:

drivers/power/supply/ab8500_fg.c:2402:5-24: WARNING: Comparison to bool

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_fg.c

index b96f90a..751c4f6 100644 (file)
@@ -2399,7 +2399,7 @@ static void ab8500_fg_reinit_work(struct work_struct *work)
        struct ab8500_fg *di = container_of(work, struct ab8500_fg,
                fg_reinit_work.work);
 
-       if (di->flags.calibrate == false) {
+       if (!di->flags.calibrate) {
                dev_dbg(di->dev, "Resetting FG state machine to init.\n");
                ab8500_fg_clear_cap_samples(di);
                ab8500_fg_calc_cap_discharge_voltage(di, true);