Re: [PATCH] usb: gadget: fotg210-udc: Remove bogus __init/__exit annotations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 10, 2013 at 11:52 PM, Sergei Shtylyov
<sergei.shtylyov@xxxxxxxxxxxxxxxxxx> wrote:
> On 07/11/2013 01:45 AM, Geert Uytterhoeven wrote:
>
>> When builtin (CONFIG_USB_FOTG210_UDC=y):
>
>>    LD      drivers/usb/gadget/built-in.o
>> WARNING: drivers/usb/gadget/built-in.o(.data+0xbf8): Section mismatch in
>> reference from the variable fotg210_driver to the function
>> .init.text:fotg210_udc_probe()
>> The variable fotg210_driver references
>> the function __init fotg210_udc_probe()
>> If the reference is valid then annotate the
>> variable with __init* or __refdata (see linux/init.h) or name the
>> variable:
>> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

>> diff --git a/drivers/usb/gadget/fotg210-udc.c
>> b/drivers/usb/gadget/fotg210-udc.c
>> index cce5535..10cd18d 100644
>> --- a/drivers/usb/gadget/fotg210-udc.c
>> +++ b/drivers/usb/gadget/fotg210-udc.c
>> @@ -1074,7 +1074,7 @@ static struct usb_gadget_ops fotg210_gadget_ops = {
>>         .udc_stop               = fotg210_udc_stop,
>>   };
>>
>> -static int __exit fotg210_udc_remove(struct platform_device *pdev)
>> +static int fotg210_udc_remove(struct platform_device *pdev)
>
>
>    I think you can leave __exit annotation here, if you enclose the
> reference in the driver structure in __exit_p()...

The driver is using module_platform_driver(), not
module_platform_driver_probe(),
so it expects the platform device to show up or disappear anytime.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux