Skip to content

Commit

Permalink
USB: g_mass_storage: fix section mismatch warnings
Browse files Browse the repository at this point in the history
The recent commit (0e530b4) that moved usb_ep_autoconfig from the
__devinit section to the __init section missed the mass storage device.
Its fsg_bind() function uses the usb_ep_autoconfig() function from non
__init context leading to:
WARNING: drivers/usb/gadget/g_mass_storage.o(.text): Section mismatch in
	reference from the function _fsg_bind()
	            to the function .init.text:_usb_ep_autoconfig()

So move fsg_bind() into __init as well.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mike Frysinger authored and Greg Kroah-Hartman committed Mar 19, 2010
1 parent f2984a3 commit f88f669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/f_mass_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -2910,7 +2910,7 @@ static void fsg_unbind(struct usb_configuration *c, struct usb_function *f)
}


static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
static int __init fsg_bind(struct usb_configuration *c, struct usb_function *f)
{
struct fsg_dev *fsg = fsg_from_func(f);
struct usb_gadget *gadget = c->cdev->gadget;
Expand Down

0 comments on commit f88f669

Please sign in to comment.