aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVicki Pfau <vi@endrift.com>2024-12-25 18:34:24 -0800
committerJiri Kosina <jkosina@suse.com>2025-01-09 10:17:46 +0100
commitcc4f952427aaa44ecfd92542e10a65cce67bd6f4 (patch)
tree4f295e7c48ebb32f9b452fa829c18abb680b49ad
parentHID: fix generic desktop D-Pad controls (diff)
downloadlinux-rng-cc4f952427aaa44ecfd92542e10a65cce67bd6f4.tar.xz
linux-rng-cc4f952427aaa44ecfd92542e10a65cce67bd6f4.zip
HID: hid-steam: Make sure rumble work is canceled on removal
When a force feedback command is sent from userspace, work is scheduled to pass this data to the controller without blocking userspace itself. However, in theory, this work might not be properly canceled if the controller is removed at the exact right time. This patch ensures the work is properly canceled when the device is removed. Signed-off-by: Vicki Pfau <vi@endrift.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to '')
-rw-r--r--drivers/hid/hid-steam.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c
index 6439913372a8..af38fc8eb34f 100644
--- a/drivers/hid/hid-steam.c
+++ b/drivers/hid/hid-steam.c
@@ -1306,6 +1306,7 @@ static void steam_remove(struct hid_device *hdev)
cancel_delayed_work_sync(&steam->mode_switch);
cancel_work_sync(&steam->work_connect);
+ cancel_work_sync(&steam->rumble_work);
hid_destroy_device(steam->client_hdev);
steam->client_hdev = NULL;
steam->client_opened = 0;