summaryrefslogtreecommitdiff
path: root/common/usb.c
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-08-18 10:55:27 +0200
committermarex <marex@chi.lan>2019-09-11 10:11:29 +0200
commit3437121c037f502a3b0faaec97059777034a1ead (patch)
tree37400fd4fb2ce3b28b7f82f0530dc4d7efad1307 /common/usb.c
parent50dce8fbf0c8b6f55e32c8d2d08ccf6e58168027 (diff)
usb: Add nonblock argument to submit_int_msg
This will be used to implement non-blocking keyboard polling in case of errors. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Diffstat (limited to 'common/usb.c')
-rw-r--r--common/usb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/usb.c b/common/usb.c
index 14b2752139..d9bcb5a57e 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -192,12 +192,15 @@ int usb_disable_asynch(int disable)
*/
/*
- * submits an Interrupt Message
+ * submits an Interrupt Message. Some drivers may implement non-blocking
+ * polling: when non-block is true and the device is not responding return
+ * -EAGAIN instead of waiting for device to respond.
*/
int usb_int_msg(struct usb_device *dev, unsigned long pipe,
- void *buffer, int transfer_len, int interval)
+ void *buffer, int transfer_len, int interval, bool nonblock)
{
- return submit_int_msg(dev, pipe, buffer, transfer_len, interval);
+ return submit_int_msg(dev, pipe, buffer, transfer_len, interval,
+ nonblock);
}
/*