<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5"><br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; +struct cpu_wp *(*get_cpu_wp)(int *wp);<br>
&gt; &gt; &gt; &gt; &gt; +<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; This is not needed.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; This is needed, otherwise it does not pass compile.<br>
&gt; &gt;<br>
&gt; &gt; This hunk is the only change to arch/arm/mach-mx5/cpu.c and get_cpu_wp<br>
&gt; &gt; is introduced with this patch, so how can this break compilation?<br>
&gt; &gt; Also, you should move this to a header file. Otherwise you risk of<br>
&gt; &gt; having multiple (and possibly different) declarations of the same<br>
&gt; &gt; function which can lead to hard to find bugs.<br>
&gt; &gt;<br>
&gt; IMHO,  get_cpu_wp is definition rather than a declaration and without it<br>
&gt; there will be errors in link phase. its declaration is in<br>
&gt; arch/arm/plat-mxc/include/mach/mxc.h.<br>
<br>
</div></div>Of course, you are right, my bad. Isn&#39;t this function common to al<br>
i.MXs? In this case it should be somewhere in plat-mxc.<br>
Anyway, it seems very odd to me to provide a global function pointer<br>
which gets overwritten by the boards. For me it is more logical to<br>
provide a mxc_register_workpoints() function along with a<br>
mxc_for_each_workpoint() iterator.<br>
<div><div></div><div class="h5"><br>
</div></div></blockquote></div>About this, I am thinking move  the global function pointer to plat-mxc/cpufreq.c and add protection before call the function pointer. Anyway, it is just about provide cpu operating points to cpufreq driver, right? Even, mxc_register_workpoints() has to go some where in cpufreq.c and export a declaration in a head file, also it needs to be called before cpufreq initialization. IMO, it&#39;s merely a preference of individuals. No offence about that, correct me:)