summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-11-15 11:32:36 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-25 09:51:56 +0100
commitbe6995447d130c46b2af9a2f66837432a1676e63 (patch)
treee5c51ed7cc2ea6c134bae53087d24e7b8ebc3614
parent2d7d639e7b72d40ecb81ca9a4f09c57a0a574197 (diff)
Input: synaptics-rmi4 - destroy F54 poller workqueue when removing
commit ba60cf9f78f0d7c8e73c7390608f7f818ee68aa0 upstream. The driver forgets to destroy workqueue in remove() similarly to what is done when probe() fails. Add a call to destroy_workqueue() to fix it. Since unregistration will wait for the work to finish, we do not need to cancel/flush the work instance in remove(). Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191114023405.31477-1-hslester96@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/input/rmi4/rmi_f54.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
index b83969020641..b669cdc8c8c6 100644
--- a/drivers/input/rmi4/rmi_f54.c
+++ b/drivers/input/rmi4/rmi_f54.c
@@ -744,6 +744,7 @@ static void rmi_f54_remove(struct rmi_function *fn)
video_unregister_device(&f54->vdev);
v4l2_device_unregister(&f54->v4l2);
+ destroy_workqueue(f54->workqueue);
}
struct rmi_function_handler rmi_f54_handler = {