Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: psmouse - replace flush_workqueue() with disable_delayed_work_sync()

The original code uses flush_workqueue() in psmouse_disconnect() to
ensure the completion of both resync_work and dev3_register_work.
Given that alps_disconnect() already uses disable_delayed_work_sync()
to cancel dev3_register_work, replacing flush_workqueue() with
disable_delayed_work_sync(&psmouse->resync_work) is more robust
and efficient.

Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://patch.msgid.link/6e40a46e5d9e6e3237702958b8f641263c28d2e4.1765939397.git.duoming@zju.edu.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Duoming Zhou and committed by
Dmitry Torokhov
3873f16d e732b2ac

+1 -1
+1 -1
drivers/input/mouse/psmouse-base.c
··· 1466 1466 1467 1467 /* make sure we don't have a resync in progress */ 1468 1468 mutex_unlock(&psmouse_mutex); 1469 - flush_workqueue(kpsmoused_wq); 1469 + disable_delayed_work_sync(&psmouse->resync_work); 1470 1470 mutex_lock(&psmouse_mutex); 1471 1471 1472 1472 if (serio->parent && serio->id.type == SERIO_PS_PSTHRU) {