lkml.org 
[lkml]   [2011]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2011-10-21 10:45    [W:0.170 / U:2.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site