Messages in this thread | | | Date | Fri, 21 Oct 2011 10:42:19 +0200 | From | Michal Marek <> | Subject | Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove |
| |
On 21.10.2011 10:32, Michal Marek wrote: > 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). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Correction: it's actually a probe function with __devinit, which on most setups (with CONFIG_HOTPLUG=y) can be called any time, but then on those setups the __devinit does not cause the section to be freed. Nevertheless, naming the variable puv3_rtc_driver is the correct solution.
Michal
| |