]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/usb/composite.h
Merge branch 'master' of git://git.infradead.org/users/dedekind/mtd-tests-2.6
[linux-2.6-omap-h63xx.git] / include / linux / usb / composite.h
index c932390c6da08c2715b39db9eb19ecea75709023..935c380ffe47ed82f2a8be443df52d686d551e0c 100644 (file)
@@ -130,6 +130,9 @@ struct usb_function {
 
 int usb_add_function(struct usb_configuration *, struct usb_function *);
 
+int usb_function_deactivate(struct usb_function *);
+int usb_function_activate(struct usb_function *);
+
 int usb_interface_id(struct usb_configuration *, struct usb_function *);
 
 /**
@@ -316,9 +319,13 @@ struct usb_composite_dev {
        struct usb_composite_driver     *driver;
        u8                              next_string_id;
 
-       spinlock_t                      lock;
+       /* the gadget driver won't enable the data pullup
+        * while the deactivation count is nonzero.
+        */
+       unsigned                        deactivations;
 
-       /* REVISIT use and existence of lock ... */
+       /* protects at least deactivation count */
+       spinlock_t                      lock;
 };
 
 extern int usb_string_id(struct usb_composite_dev *c);