]> 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)
commitdcf35ea4206e48431e403159e572623beadb019b
tree15c112ee58741e559d9c3a60f6e1ee43186db903
parentb9034c2f09988c652d57b5adca80d430c88bce37
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: c88f89a00205 ("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