]> asedeno.scripts.mit.edu Git - linux.git/commit
HID: usbhid: do not rely on hid->open when deciding to do IO
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 7 Jun 2017 06:59:33 +0000 (23:59 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 8 Jun 2017 11:56:09 +0000 (13:56 +0200)
commit28cbc863f4bfa92c26143493f0463e4eb96a1783
treed39ec884c850713b30bbd05235d25df446114cf6
parent9a83563fb3f926cbf0d5992d5c70d760c445ba09
HID: usbhid: do not rely on hid->open when deciding to do IO

Instead of checking hid->open (that we plan on having HID core manage) in
hid_start_in(), let's allocate a couple of new flags: HID_IN_POLLING and
HID_OPENED, and use them to decide whether we should be submitting URBs or
not.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/usbhid.h