HID: hid-steam: Move hidraw input (un)registering to work
authorVicki Pfau <vi@endrift.com>
Wed, 5 Feb 2025 03:55:27 +0000 (19:55 -0800)
committerJiri Kosina <jkosina@suse.com>
Fri, 7 Feb 2025 13:27:48 +0000 (14:27 +0100)
commit79504249d7e27cad4a3eeb9afc6386e418728ce0
tree61e8442c7dc5e03e9c75559bfc490665ec1c66a1
parent0b43d98ff29be3144e86294486b1373b5df74c0e
HID: hid-steam: Move hidraw input (un)registering to work

Due to an interplay between locking in the input and hid transport subsystems,
attempting to register or deregister the relevant input devices during the
hidraw open/close events can lead to a lock ordering issue. Though this
shouldn't cause a deadlock, this commit moves the input device manipulation to
deferred work to sidestep the issue.

Fixes: 385a4886778f6 ("HID: steam: remove input device when a hid client is running.")
Signed-off-by: Vicki Pfau <vi@endrift.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-steam.c