Skip to content
Commit 4bff980f authored by Rodrigo Rivas Costa's avatar Rodrigo Rivas Costa Committed by Jiri Kosina
Browse files

HID: steam: use hid_device.driver_data instead of hid_set_drvdata()



When creating the low-level hidraw device, the reference to steam_device
was stored using hid_set_drvdata(). But this value is not guaranteed to
be kept when set before calling probe. If this pointer is reset, it
crashes when opening the emulated hidraw device.

It looks like hid_set_drvdata() is for users "avobe" this hid_device,
while hid_device.driver_data it for users "below" this one.

In this case, we are creating a virtual hidraw device, so we must use
hid_device.driver_data.

Signed-off-by: default avatarRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Tested-by: default avatarMariusz Ceier <mceier+kernel@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 3e84c765
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment