usb gadget: don't save bind callback in struct usb_composite_driver

The bind function is most of the time only called at init time so there
is no need to save a pointer to it in the composite driver structure.

This fixes many section mismatches reported by modpost.

Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Michal Nazarewicz
2010-08-12 17:43:54 +02:00
committed by Greg Kroah-Hartman
parent b0fca50f5a
commit 07a18bd716
13 changed files with 27 additions and 40 deletions

View File

@@ -166,13 +166,12 @@ static struct usb_composite_driver audio_driver = {
.name = "g_audio",
.dev = &device_desc,
.strings = audio_strings,
.bind = audio_bind,
.unbind = __exit_p(audio_unbind),
};
static int __init init(void)
{
return usb_composite_register(&audio_driver);
return usb_composite_probe(&audio_driver, audio_bind);
}
module_init(init);