[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:
committed by
Greg Kroah-Hartman
parent
43c5d5aaaf
commit
329af28b14
@ -3678,7 +3678,7 @@ static void lun_release(struct device *dev)
|
||||
kref_put(&fsg->ref, fsg_release);
|
||||
}
|
||||
|
||||
static void fsg_unbind(struct usb_gadget *gadget)
|
||||
static void __exit fsg_unbind(struct usb_gadget *gadget)
|
||||
{
|
||||
struct fsg_dev *fsg = get_gadget_data(gadget);
|
||||
int i;
|
||||
@ -4064,7 +4064,7 @@ static struct usb_gadget_driver fsg_driver = {
|
||||
#endif
|
||||
.function = (char *) longname,
|
||||
.bind = fsg_bind,
|
||||
.unbind = fsg_unbind,
|
||||
.unbind = __exit_p(fsg_unbind),
|
||||
.disconnect = fsg_disconnect,
|
||||
.setup = fsg_setup,
|
||||
.suspend = fsg_suspend,
|
||||
|
Reference in New Issue
Block a user