]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:16 +0000 (18:41 +0200)
commitc9ce9b98a8f6b81827347690fbf80de0fedfdf78
treef7dcd694dec8e8aa3b022eb09e360a8ca5d9cd3b
parent6bf660d4b66a1115e59cb863b49389ef6298a95b
power: supply: ab8500_fg: Allocate wq in probe

[ Upstream commit 010ddb813f3554cbbf8bd13b731452236a2c8017 ]

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: 1c1f13a006ed ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/ab8500_fg.c