mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
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>
This commit is contained in:
parent
80818fdc06
commit
cc4f952427
|
@ -1306,6 +1306,7 @@ static void steam_remove(struct hid_device *hdev)
|
||||||
|
|
||||||
cancel_delayed_work_sync(&steam->mode_switch);
|
cancel_delayed_work_sync(&steam->mode_switch);
|
||||||
cancel_work_sync(&steam->work_connect);
|
cancel_work_sync(&steam->work_connect);
|
||||||
|
cancel_work_sync(&steam->rumble_work);
|
||||||
hid_destroy_device(steam->client_hdev);
|
hid_destroy_device(steam->client_hdev);
|
||||||
steam->client_hdev = NULL;
|
steam->client_hdev = NULL;
|
||||||
steam->client_opened = 0;
|
steam->client_opened = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user