Skip to contentSkip to conversation

Input: synaptics-rmi4 - add missed operations in remove

PATCH Applied Chuhong Yuan 2 participants 2 messages Nov 14, 2019 – Nov 15, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Input: synaptics-rmi4 - add missed operations in remove

The driver forgets to destroy workqueue in remove like 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 deal with work in remove.

---
Changes in v2:
- Remove the calls of canceling delay and flushing workqueue.
- Modify the commit message.

 drivers/input/rmi4/rmi_f54.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/rmi4/rmi_f54.c +1 -0
index 484ae1f97330..897105b9a98b 100644
@@ -730,6 +730,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 = {
Signature · 1 line
2.23.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Chuhong Yuan

The driver forgets to destroy workqueue in remove like 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 deal with work in remove.

Applied, thank you.

Quoted 23 lines

---
Changes in v2:
- Remove the calls of canceling delay and flushing workqueue.
- Modify the commit message.

 drivers/input/rmi4/rmi_f54.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/rmi4/rmi_f54.c +1 -0
index 484ae1f97330..897105b9a98b 100644
@@ -730,6 +730,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 = {
Signature · 1 line
2.23.0
Signature · 1 line
Dmitry