diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-06-07 09:59:33 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-06-08 14:56:09 +0300 |
commit | 28cbc863f4bfa92c26143493f0463e4eb96a1783 (patch) | |
tree | d39ec884c850713b30bbd05235d25df446114cf6 /drivers/hid/usbhid/usbhid.h | |
parent | 9a83563fb3f926cbf0d5992d5c70d760c445ba09 (diff) | |
download | linux-28cbc863f4bfa92c26143493f0463e4eb96a1783.tar.xz |
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>
Diffstat (limited to 'drivers/hid/usbhid/usbhid.h')
-rw-r--r-- | drivers/hid/usbhid/usbhid.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h index ffcd329b3c3b..da9c61d54be6 100644 --- a/drivers/hid/usbhid/usbhid.h +++ b/drivers/hid/usbhid/usbhid.h @@ -49,6 +49,17 @@ struct usb_interface *usbhid_find_interface(int minor); #define HID_KEYS_PRESSED 10 #define HID_NO_BANDWIDTH 11 #define HID_RESUME_RUNNING 12 +/* + * The device is opened, meaning there is a client that is interested + * in data coming from the device. + */ +#define HID_OPENED 13 +/* + * We are polling input endpoint by [re]submitting IN URB, because + * either HID device is opened or ALWAYS POLL quirk is set for the + * device. + */ +#define HID_IN_POLLING 14 /* * USB-specific HID struct, to be pointed to |