lkml.org 
[lkml]   [2019]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Input: synaptics-rmi4 - add missed operations in remove
Date
The driver forgets to deal with work and workqueue in remove like what
is done when probe fails.
Add the missed operations to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/input/rmi4/rmi_f54.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
index 710b02595486..2c0cde5c775c 100644
--- a/drivers/input/rmi4/rmi_f54.c
+++ b/drivers/input/rmi4/rmi_f54.c
@@ -730,6 +730,9 @@ static void rmi_f54_remove(struct rmi_function *fn)

video_unregister_device(&f54->vdev);
v4l2_device_unregister(&f54->v4l2);
+ cancel_delayed_work_sync(&f54->work);
+ flush_workqueue(f54->workqueue);
+ destroy_workqueue(f54->workqueue);
}

struct rmi_function_handler rmi_f54_handler = {
--
2.23.0
\
 
 \ /
  Last update: 2019-11-13 07:38    [W:0.088 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site