aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/gadget.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index d05b220f0fd3..9eb4e712168f 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -766,6 +766,7 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget)
766 * when the host is disconnected. May be called in_interrupt; this 766 * when the host is disconnected. May be called in_interrupt; this
767 * may not sleep. Some devices can't detect disconnect, so this might 767 * may not sleep. Some devices can't detect disconnect, so this might
768 * not be called except as part of controller shutdown. 768 * not be called except as part of controller shutdown.
769 * @bind: the driver's bind callback
769 * @unbind: Invoked when the driver is unbound from a gadget, 770 * @unbind: Invoked when the driver is unbound from a gadget,
770 * usually from rmmod (after a disconnect is reported). 771 * usually from rmmod (after a disconnect is reported).
771 * Called in a context that permits sleeping. 772 * Called in a context that permits sleeping.
@@ -820,6 +821,7 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget)
820struct usb_gadget_driver { 821struct usb_gadget_driver {
821 char *function; 822 char *function;
822 enum usb_device_speed max_speed; 823 enum usb_device_speed max_speed;
824 int (*bind)(struct usb_gadget *gadget);
823 void (*unbind)(struct usb_gadget *); 825 void (*unbind)(struct usb_gadget *);
824 int (*setup)(struct usb_gadget *, 826 int (*setup)(struct usb_gadget *,
825 const struct usb_ctrlrequest *); 827 const struct usb_ctrlrequest *);
@@ -845,7 +847,6 @@ struct usb_gadget_driver {
845/** 847/**
846 * usb_gadget_probe_driver - probe a gadget driver 848 * usb_gadget_probe_driver - probe a gadget driver
847 * @driver: the driver being registered 849 * @driver: the driver being registered
848 * @bind: the driver's bind callback
849 * Context: can sleep 850 * Context: can sleep
850 * 851 *
851 * Call this in your gadget driver's module initialization function, 852 * Call this in your gadget driver's module initialization function,
@@ -854,8 +855,7 @@ struct usb_gadget_driver {
854 * registration call returns. It's expected that the @bind() function will 855 * registration call returns. It's expected that the @bind() function will
855 * be in init sections. 856 * be in init sections.
856 */ 857 */
857int usb_gadget_probe_driver(struct usb_gadget_driver *driver, 858int usb_gadget_probe_driver(struct usb_gadget_driver *driver);
858 int (*bind)(struct usb_gadget *));
859 859
860/** 860/**
861 * usb_gadget_unregister_driver - unregister a gadget driver 861 * usb_gadget_unregister_driver - unregister a gadget driver