diff options
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r-- | include/linux/usb/gadget.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index d3ef42d7d2f0..006412ce2303 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -705,11 +705,6 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget) | |||
705 | * struct usb_gadget_driver - driver for usb 'slave' devices | 705 | * struct usb_gadget_driver - driver for usb 'slave' devices |
706 | * @function: String describing the gadget's function | 706 | * @function: String describing the gadget's function |
707 | * @speed: Highest speed the driver handles. | 707 | * @speed: Highest speed the driver handles. |
708 | * @bind: Invoked when the driver is bound to a gadget, usually | ||
709 | * after registering the driver. | ||
710 | * At that point, ep0 is fully initialized, and ep_list holds | ||
711 | * the currently-available endpoints. | ||
712 | * Called in a context that permits sleeping. | ||
713 | * @setup: Invoked for ep0 control requests that aren't handled by | 708 | * @setup: Invoked for ep0 control requests that aren't handled by |
714 | * the hardware level driver. Most calls must be handled by | 709 | * the hardware level driver. Most calls must be handled by |
715 | * the gadget driver, including descriptor and configuration | 710 | * the gadget driver, including descriptor and configuration |
@@ -774,7 +769,6 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget) | |||
774 | struct usb_gadget_driver { | 769 | struct usb_gadget_driver { |
775 | char *function; | 770 | char *function; |
776 | enum usb_device_speed speed; | 771 | enum usb_device_speed speed; |
777 | int (*bind)(struct usb_gadget *); | ||
778 | void (*unbind)(struct usb_gadget *); | 772 | void (*unbind)(struct usb_gadget *); |
779 | int (*setup)(struct usb_gadget *, | 773 | int (*setup)(struct usb_gadget *, |
780 | const struct usb_ctrlrequest *); | 774 | const struct usb_ctrlrequest *); |
@@ -798,17 +792,19 @@ struct usb_gadget_driver { | |||
798 | */ | 792 | */ |
799 | 793 | ||
800 | /** | 794 | /** |
801 | * usb_gadget_register_driver - register a gadget driver | 795 | * usb_gadget_probe_driver - probe a gadget driver |
802 | * @driver:the driver being registered | 796 | * @driver: the driver being registered |
797 | * @bind: the driver's bind callback | ||
803 | * Context: can sleep | 798 | * Context: can sleep |
804 | * | 799 | * |
805 | * Call this in your gadget driver's module initialization function, | 800 | * Call this in your gadget driver's module initialization function, |
806 | * to tell the underlying usb controller driver about your driver. | 801 | * to tell the underlying usb controller driver about your driver. |
807 | * The driver's bind() function will be called to bind it to a | 802 | * The @bind() function will be called to bind it to a gadget before this |
808 | * gadget before this registration call returns. It's expected that | 803 | * registration call returns. It's expected that the @bind() function will |
809 | * the bind() functions will be in init sections. | 804 | * be in init sections. |
810 | */ | 805 | */ |
811 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); | 806 | int usb_gadget_probe_driver(struct usb_gadget_driver *driver, |
807 | int (*bind)(struct usb_gadget *)); | ||
812 | 808 | ||
813 | /** | 809 | /** |
814 | * usb_gadget_unregister_driver - unregister a gadget driver | 810 | * usb_gadget_unregister_driver - unregister a gadget driver |