瀏覽代碼

HID: asus: Stop underlying hardware on remove

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>
Carlo Caione 8 年之前
父節點
當前提交
715e944f8a
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/hid/hid-asus.c

+ 2 - 0
drivers/hid/hid-asus.c

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