mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
HID: steam: Fix input device disappearing
[ Upstream commit 20eee6e5af ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
284cd2ab3c
commit
e8d49deb45
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user