aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-09-18 10:51:23 -0400
committerFelipe Balbi <balbi@ti.com>2014-11-03 11:00:54 -0500
commit6c93b5342374b3ff2a8beac050ed6e07373cbe95 (patch)
tree6c7e461c97519dd6e85c1436051e722e1c7a3ab2 /include/linux/usb
parent404905a604d8565b62a2889c5045acf57aa434be (diff)
usb: gadget: composite: introduce setup and os_desc pending flags
These flags we be set to true whenever their matching request is queued. They will be cleared to false when that request completes. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/composite.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index c330f5ef42cf..ed3811c09ec1 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -427,6 +427,8 @@ static inline struct usb_composite_driver *to_cdriver(
427 * @b_vendor_code: bMS_VendorCode part of the OS string 427 * @b_vendor_code: bMS_VendorCode part of the OS string
428 * @use_os_string: false by default, interested gadgets set it 428 * @use_os_string: false by default, interested gadgets set it
429 * @os_desc_config: the configuration to be used with OS descriptors 429 * @os_desc_config: the configuration to be used with OS descriptors
430 * @setup_pending: true when setup request is queued but not completed
431 * @os_desc_pending: true when os_desc request is queued but not completed
430 * 432 *
431 * One of these devices is allocated and initialized before the 433 * One of these devices is allocated and initialized before the
432 * associated device driver's bind() is called. 434 * associated device driver's bind() is called.
@@ -488,6 +490,9 @@ struct usb_composite_dev {
488 490
489 /* protects deactivations and delayed_status counts*/ 491 /* protects deactivations and delayed_status counts*/
490 spinlock_t lock; 492 spinlock_t lock;
493
494 unsigned setup_pending:1;
495 unsigned os_desc_pending:1;
491}; 496};
492 497
493extern int usb_string_id(struct usb_composite_dev *c); 498extern int usb_string_id(struct usb_composite_dev *c);