Define .connect for configfs_driver_template, and export
composite_connect for configfs.

Signed-off-by: Peter Chen <peter.c...@freescale.com>
---
 drivers/usb/gadget/composite.c |    2 +-
 drivers/usb/gadget/configfs.c  |    1 +
 include/linux/usb/composite.h  |    1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index c4ce977..ada0905 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -2069,7 +2069,7 @@ composite_resume(struct usb_gadget *gadget)
 /*
  * UDC driver calls this when it wants to pull up dp.
  */
-static int composite_connect(struct usb_gadget *gadget, bool connect)
+int composite_connect(struct usb_gadget *gadget, bool connect)
 {
        if (connect)
                return usb_gadget_connect(gadget);
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 811c2c7..63badc9 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -1451,6 +1451,7 @@ static const struct usb_gadget_driver 
configfs_driver_template = {
 
        .setup          = composite_setup,
        .disconnect     = composite_disconnect,
+       .connect        = composite_connect,
 
        .max_speed      = USB_SPEED_SUPER,
        .driver = {
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index c330f5e..820ca85 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -501,6 +501,7 @@ extern int usb_string_ids_n(struct usb_composite_dev *c, 
unsigned n);
 extern void composite_disconnect(struct usb_gadget *gadget);
 extern int composite_setup(struct usb_gadget *gadget,
                const struct usb_ctrlrequest *ctrl);
+extern int composite_connect(struct usb_gadget *gadget, bool connect);
 
 /*
  * Some systems will need runtime overrides for the  product identifiers
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to