diff options
author | David Brownell <david-b@pacbell.net> | 2006-02-18 12:31:05 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 14:49:58 -0800 |
commit | 329af28b141ab4ae847aff1362864c4cc332641f (patch) | |
tree | c4871a6065ed635998204efef0a63fda8c3dbfcc /include/linux/usb_gadget.h | |
parent | 43c5d5aaafef56618a6efbcab7f91615da1a8659 (diff) | |
download | linux-329af28b141ab4ae847aff1362864c4cc332641f.tar.gz linux-329af28b141ab4ae847aff1362864c4cc332641f.tar.bz2 linux-329af28b141ab4ae847aff1362864c4cc332641f.zip |
[PATCH] USB: gadget driver section fixups
This adds __init section annotations to gadget driver bind() routines to
remove calls from .text into .init sections (for endpoint autoconfig).
Likewise it adds __exit section annotations to their unbind() routines.
The specification of the gadget driver register/unregister functions is
updated to explicitly allow use of those sections.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb_gadget.h')
-rw-r--r-- | include/linux/usb_gadget.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index ff81117eb733..1d78870ed8af 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h @@ -801,7 +801,9 @@ struct usb_gadget_driver { * Call this in your gadget driver's module initialization function, * to tell the underlying usb controller driver about your driver. * The driver's bind() function will be called to bind it to a - * gadget. This function must be called in a context that can sleep. + * gadget before this registration call returns. It's expected that + * the bind() functions will be in init sections. + * This function must be called in a context that can sleep. */ int usb_gadget_register_driver (struct usb_gadget_driver *driver); @@ -814,7 +816,8 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver); * going away. If the controller is connected to a USB host, * it will first disconnect(). The driver is also requested * to unbind() and clean up any device state, before this procedure - * finally returns. + * finally returns. It's expected that the unbind() functions + * will in in exit sections, so may not be linked in some kernels. * This function must be called in a context that can sleep. */ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver); |