usb: gadget: composite: introduce setup and os_desc pending flags
authorFelipe Balbi <balbi@ti.com>
Thu, 18 Sep 2014 14:51:23 +0000 (09:51 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 3 Nov 2014 16:00:54 +0000 (10:00 -0600)
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>
include/linux/usb/composite.h

index c330f5ef42cf7ca50d2472fb3c935c70c2884f1e..ed3811c09ec1e88c7db0f97a01524b2dc9cec4c0 100644 (file)
@@ -427,6 +427,8 @@ static inline struct usb_composite_driver *to_cdriver(
  * @b_vendor_code: bMS_VendorCode part of the OS string
  * @use_os_string: false by default, interested gadgets set it
  * @os_desc_config: the configuration to be used with OS descriptors
+ * @setup_pending: true when setup request is queued but not completed
+ * @os_desc_pending: true when os_desc request is queued but not completed
  *
  * One of these devices is allocated and initialized before the
  * associated device driver's bind() is called.
@@ -488,6 +490,9 @@ struct usb_composite_dev {
 
        /* protects deactivations and delayed_status counts*/
        spinlock_t                      lock;
+
+       unsigned                        setup_pending:1;
+       unsigned                        os_desc_pending:1;
 };
 
 extern int usb_string_id(struct usb_composite_dev *c);
This page took 0.027402 seconds and 5 git commands to generate.