1
0
Fork 0
Commit Graph

4 Commits (5.4-rM2-2.2.x-imx)

Author SHA1 Message Date
Hanno Zulla dd0d2d6ab6 HID: hid-bigbenff: fix race condition for scheduled work during removal
[ Upstream commit 4eb1b01de5 ]

It's possible that there is scheduled work left while the device is
already being removed, which can cause a kernel crash. Adding a flag
will avoid this.

Signed-off-by: Hanno Zulla <kontakt@hanno.de>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-03-21 08:11:49 +01:00
Hanno Zulla ccb747d805 HID: hid-bigbenff: call hid_hw_stop() in case of error
[ Upstream commit 976a54d0f4 ]

It's required to call hid_hw_stop() once hid_hw_start() was called
previously, so error cases need to handle this. Also, hid_hw_close() is
not necessary during removal.

Signed-off-by: Hanno Zulla <kontakt@hanno.de>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-03-21 08:11:49 +01:00
Hanno Zulla 1bc271dd39 HID: hid-bigbenff: fix general protection fault caused by double kfree
[ Upstream commit 789a2c2503 ]

The struct *bigben was allocated via devm_kzalloc() and then used as a
parameter in input_ff_create_memless(). This caused a double kfree
during removal of the device, since both the managed resource API and
ml_ff_destroy() in drivers/input/ff-memless.c would call kfree() on it.

Signed-off-by: Hanno Zulla <kontakt@hanno.de>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-03-21 08:11:48 +01:00
Hanno Zulla 256a90ed9e HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad
This is a driver to fix input mapping and add LED & force feedback
support for the "BigBen Interactive Kid-friendly Wired Controller
PS3OFMINIPAD SONY" gamepad with USB id 146b:0902. It was originally
sold as a PS3 accessory and makes a very nice gamepad for Retropie.

Signed-off-by: Hanno Zulla <kontakt@hanno.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24 11:49:32 +02:00