summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Rivas Costa <rodrigorivascosta@gmail.com>2020-01-07 20:48:13 +0100
committerSiarhei Vishniakou <svv@google.com>2020-05-14 19:14:59 +0000
commit9bfa942fde10cb7ff5da7f4a3257641569391d56 (patch)
tree3a22113de5f010567dcc20eb859eb6eac87da7a2
parent7db93d30213a10b367665323fab518663eee93e3 (diff)
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: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Bug: 147434575 (cherry picked from commit 20eee6e5af35d9586774e80b6e0b1850e7cc9899) Signed-off-by: Siarhei Vishniakou <svv@google.com> Change-Id: Ib362e0dec7d53dfc4fcfdca45824cf90358240e2
-rw-r--r--drivers/hid/hid-steam.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c
index 44e1eefc5b24..a4a6c90c8134 100644
--- a/drivers/hid/hid-steam.c
+++ b/drivers/hid/hid-steam.c
@@ -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,