extcon: ptn5150: Add queue work sync before driver release
authorLi Jun <jun.li@nxp.com>
Tue, 19 Apr 2022 12:44:08 +0000 (20:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:07 +0000 (18:36 +0200)
commita6061695bb2be3535925279e20d59a0ce0718d64
tree4748ca33f1a72453151d53822b0f9983e2a7b3cb
parentcf824b95c12a1abacadbc2d069931963221a3414
extcon: ptn5150: Add queue work sync before driver release

[ Upstream commit 782cd939cbe0f569197cd1c9b0477ee213167f04 ]

Add device managed action to sync pending queue work, otherwise
the queued work may run after the work is destroyed.

Fixes: 4ed754de2d66 ("extcon: Add support for ptn5150 extcon driver")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/extcon/extcon-ptn5150.c