]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: ab8500_fg: Allocate wq in probe
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 23 Apr 2022 17:27:27 +0000 (19:27 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 3 May 2022 15:10:40 +0000 (17:10 +0200)
commit0962da6706f90c0d878ce66960cc7ebb6454c622
tree15c112ee58741e559d9c3a60f6e1ee43186db903
parentd94673c453adefb9cbe9e0cacfed26020c664b9e
power: supply: ab8500_fg: Allocate wq in probe

The workqueue is allocated in bind() but all interrupts are
registered in probe().

Some interrupts put work on the workqueue, which can have
bad side effects.

Allocate the workqueue in probe() instead, destroy it in
.remove() and make unbind() simply flush the workqueue.

Fixes: cfa0d17b6a35 ("power: supply: ab8500: Move to componentized binding")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_fg.c