HID: hid-steam: Clean up locking
authorVicki Pfau <vi@endrift.com>
Wed, 20 Dec 2023 03:38:33 +0000 (19:38 -0800)
committerJiri Kosina <jkosina@suse.com>
Tue, 2 Jan 2024 10:20:42 +0000 (11:20 +0100)
commit691ead124a0c35e56633dbb73e43711ff3db23ef
tree03332653e05ff4f6f234cfed15027cb902ebf7ea
parent917972636e8271c5691710ce5dcd66c2d3bd04f2
HID: hid-steam: Clean up locking

This cleans up the locking logic so that the spinlock is consistently used for
access to a small handful of struct variables, and the mutex is exclusively and
consistently used for ensuring that mutliple threads aren't trying to
send/receive reports at the same time. Previously, only some report
transactions were guarded by this mutex, potentially breaking atomicity. The
mutex has been renamed to reflect this usage.

Signed-off-by: Vicki Pfau <vi@endrift.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-steam.c