Commit 2d5a8899 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Felipe Balbi

usb: gadget: export composite's setup & disconnect function

The configfs can't use all of composite's hooks because ->bind() and
->unbind() has to be done a little differently. ->disconnect() and
->setup() on the hand can be recycled.
This patch exports them both so configfs can use them.
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a5923340
...@@ -1077,7 +1077,7 @@ static void composite_setup_complete(struct usb_ep *ep, struct usb_request *req) ...@@ -1077,7 +1077,7 @@ static void composite_setup_complete(struct usb_ep *ep, struct usb_request *req)
* housekeeping for the gadget function we're implementing. Most of * housekeeping for the gadget function we're implementing. Most of
* the work is in config and function specific setup. * the work is in config and function specific setup.
*/ */
static int int
composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
{ {
struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_composite_dev *cdev = get_gadget_data(gadget);
...@@ -1344,7 +1344,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) ...@@ -1344,7 +1344,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
return value; return value;
} }
static void composite_disconnect(struct usb_gadget *gadget) void composite_disconnect(struct usb_gadget *gadget)
{ {
struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_composite_dev *cdev = get_gadget_data(gadget);
unsigned long flags; unsigned long flags;
......
...@@ -398,6 +398,10 @@ extern int usb_string_ids_tab(struct usb_composite_dev *c, ...@@ -398,6 +398,10 @@ extern int usb_string_ids_tab(struct usb_composite_dev *c,
struct usb_string *str); struct usb_string *str);
extern int usb_string_ids_n(struct usb_composite_dev *c, unsigned n); 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);
/* /*
* Some systems will need runtime overrides for the product identifiers * Some systems will need runtime overrides for the product identifiers
* published in the device descriptor, either numbers or strings or both. * published in the device descriptor, either numbers or strings or both.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment