aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/serial.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-02-18 15:31:05 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:58 -0500
commit329af28b141ab4ae847aff1362864c4cc332641f (patch)
treec4871a6065ed635998204efef0a63fda8c3dbfcc /drivers/usb/gadget/serial.c
parent43c5d5aaafef56618a6efbcab7f91615da1a8659 (diff)
[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 'drivers/usb/gadget/serial.c')
-rw-r--r--drivers/usb/gadget/serial.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index ba9acd531024..548feaac4553 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -369,7 +369,7 @@ static struct usb_gadget_driver gs_gadget_driver = {
369#endif /* CONFIG_USB_GADGET_DUALSPEED */ 369#endif /* CONFIG_USB_GADGET_DUALSPEED */
370 .function = GS_LONG_NAME, 370 .function = GS_LONG_NAME,
371 .bind = gs_bind, 371 .bind = gs_bind,
372 .unbind = gs_unbind, 372 .unbind = __exit_p(gs_unbind),
373 .setup = gs_setup, 373 .setup = gs_setup,
374 .disconnect = gs_disconnect, 374 .disconnect = gs_disconnect,
375 .driver = { 375 .driver = {
@@ -1413,7 +1413,7 @@ requeue:
1413 * Called on module load. Allocates and initializes the device 1413 * Called on module load. Allocates and initializes the device
1414 * structure and a control request. 1414 * structure and a control request.
1415 */ 1415 */
1416static int gs_bind(struct usb_gadget *gadget) 1416static int __init gs_bind(struct usb_gadget *gadget)
1417{ 1417{
1418 int ret; 1418 int ret;
1419 struct usb_ep *ep; 1419 struct usb_ep *ep;
@@ -1538,7 +1538,7 @@ autoconf_fail:
1538 * Called on module unload. Frees the control request and device 1538 * Called on module unload. Frees the control request and device
1539 * structure. 1539 * structure.
1540 */ 1540 */
1541static void gs_unbind(struct usb_gadget *gadget) 1541static void __exit gs_unbind(struct usb_gadget *gadget)
1542{ 1542{
1543 struct gs_dev *dev = get_gadget_data(gadget); 1543 struct gs_dev *dev = get_gadget_data(gadget);
1544 1544