Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75acb7a5 authored by Rodrigo Rivas Costa's avatar Rodrigo Rivas Costa Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: 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: default avatarRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>

Bug: 147434575
(cherry picked from commit 20eee6e5af35d9586774e80b6e0b1850e7cc9899)
Signed-off-by: default avatarSiarhei Vishniakou <svv@google.com>
Change-Id: Ib362e0dec7d53dfc4fcfdca45824cf90358240e2
parent 6be68d89
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -768,8 +768,12 @@ static int steam_probe(struct hid_device *hdev,

	if (steam->quirks & STEAM_QUIRK_WIRELESS) {
		hid_info(hdev, "Steam wireless receiver connected");
		/* If using a wireless adaptor ask for connection status */
		steam->connected = false;
		steam_request_conn_status(steam);
	} else {
		/* A wired connection is always present */
		steam->connected = true;
		ret = steam_register(steam);
		if (ret) {
			hid_err(hdev,