Messages in this thread | | | Date | Fri, 21 Oct 2011 10:32:29 +0200 | From | Michal Marek <> | Subject | Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove |
| |
On 18.10.2011 09:22, Guan Xuetao wrote: > Hi Axel, > The patch yield following warnings: > > WARNING: drivers/rtc/built-in.o(.data+0x90): Section mismatch in > reference from the variable puv3_rtcdrv to the > function .devinit.text:puv3_rtc_probe() > The variable puv3_rtcdrv references > the function __devinit puv3_rtc_probe() > If the reference is valid then annotate the > variable with __init* or __refdata (see linux/init.h) or name the > variable: > *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, > *_console [...] > > For puv3_rtc_probe, I think it should be in the white-list, but warnings > are yielded. > For puv3_rtc_remove, the warning could be disappeared by modifying > __devexit to __exit, however is it proper?
The warning message tries to hint at the solution. Just name the variable
static struct platform_driver puv3_rtc_driver
and modpost will know that this is simply a list of pointers to driver functions, in which case the section mismatch is OK (the init function will only be called at init time).
Michal
| |