Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers forprobe and remove

From: Michal Marek
Date: Fri Oct 21 2011 - 04:42:21 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/