Skip to content

Commit 20eee6e

Browse files
rodrigorcJiri Kosina
authored andcommitted
HID: steam: Fix input device disappearing
The `connected` value for wired devices was not properly initialized, it must be set to `true` upon creation, because wired devices do not generate connection events. When a raw client (the Steam Client) uses the device, the input device is destroyed. Then, when the raw client finishes, it must be recreated. But since the `connected` variable was false this never happended. Signed-off-by: Rodrigo Rivas Costa <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 1479a82 commit 20eee6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/hid/hid-steam.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,12 @@ static int steam_probe(struct hid_device *hdev,
768768

769769
if (steam->quirks & STEAM_QUIRK_WIRELESS) {
770770
hid_info(hdev, "Steam wireless receiver connected");
771+
/* If using a wireless adaptor ask for connection status */
772+
steam->connected = false;
771773
steam_request_conn_status(steam);
772774
} else {
775+
/* A wired connection is always present */
776+
steam->connected = true;
773777
ret = steam_register(steam);
774778
if (ret) {
775779
hid_err(hdev,

0 commit comments

Comments
 (0)