[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>
This commit is contained in:
David Brownell
2006-02-18 12:31:05 -08:00
committed by Greg Kroah-Hartman
parent 43c5d5aaaf
commit 329af28b14
5 changed files with 15 additions and 12 deletions

View File

@@ -2125,7 +2125,7 @@ eth_req_free (struct usb_ep *ep, struct usb_request *req)
}
static void
static void __exit
eth_unbind (struct usb_gadget *gadget)
{
struct eth_dev *dev = get_gadget_data (gadget);
@@ -2532,7 +2532,7 @@ static struct usb_gadget_driver eth_driver = {
.function = (char *) driver_desc,
.bind = eth_bind,
.unbind = eth_unbind,
.unbind = __exit_p(eth_unbind),
.setup = eth_setup,
.disconnect = eth_disconnect,