Hi, On Fri, Oct 19, 2012 at 12:24:39PM +0200, Christoph Fritz wrote: > To initialize this driver use 'module_platform_driver' instead > of '__init' and '__exit'. > > Signed-off-by: Christoph Fritz <chf.fritz@xxxxxxxxxxxxxx> > --- > drivers/usb/gadget/fsl_udc_core.c | 37 +++++++++++-------------------------- > 1 files changed, 11 insertions(+), 26 deletions(-) > > diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c > index 6ae70cb..340451d 100644 > --- a/drivers/usb/gadget/fsl_udc_core.c > +++ b/drivers/usb/gadget/fsl_udc_core.c > @@ -49,13 +49,14 @@ > > #include "fsl_usb2_udc.h" > > +#define DRIVER_NAME "fsl-usb2-udc" > #define DRIVER_DESC "Freescale High-Speed USB SOC Device Controller driver" > #define DRIVER_AUTHOR "Li Yang/Jiang Bo" > #define DRIVER_VERSION "Apr 20, 2007" > > #define DMA_ADDR_INVALID (~(dma_addr_t)0) > > -static const char driver_name[] = "fsl-usb2-udc"; > +static const char driver_name[] = DRIVER_NAME; > static const char driver_desc[] = DRIVER_DESC; > > static struct usb_dr_device *dr_regs; > @@ -2761,35 +2762,19 @@ static int fsl_udc_otg_resume(struct device *dev) > Register entry point for the peripheral controller driver > --------------------------------------------------------------------------*/ > > -static struct platform_driver udc_driver = { > - .remove = __exit_p(fsl_udc_remove), > - /* these suspend and resume are not usb suspend and resume */ > - .suspend = fsl_udc_suspend, > - .resume = fsl_udc_resume, > - .driver = { > - .name = (char *)driver_name, > - .owner = THIS_MODULE, > - /* udc suspend/resume called from OTG driver */ > +static struct platform_driver fsl_udc_driver = { > + .probe = fsl_udc_probe, NAK, probe() lies in .init.text section. You need to change __init to __devinit. Likewise for all functions which are only called during probe() and for remove() which needs s/__exit/__devexit. -- balbi
Attachment:
signature.asc
Description: Digital signature