HID: asus: Stop underlying hardware on remove
authorCarlo Caione <carlo@endlessm.com>
Tue, 30 May 2017 20:39:46 +0000 (22:39 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 2 Jun 2017 12:13:22 +0000 (14:13 +0200)
We are missing a call to hid_hw_stop() on the remove hook.
Among other things this is causing an Oops when (re-)starting GNOME /
upowerd / ... after the module has been already rmmod-ed.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-asus.c

index 101ab2e63d1883a99579bc2e19762d5b160df68d..a6268f2f7408a520660c6add3c734a8006474393 100644 (file)
@@ -537,6 +537,8 @@ static void asus_remove(struct hid_device *hdev)
                drvdata->kbd_backlight->removed = true;
                cancel_work_sync(&drvdata->kbd_backlight->work);
        }
+
+       hid_hw_stop(hdev);
 }
 
 static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,