On Tue, Jan 08, 2013 at 08:11:37PM +0530, Viresh Kumar wrote: > On 8 January 2013 20:05, Shawn Guo <shawn.guo@xxxxxxxxxx> wrote: > >> > +static int imx6q_cpufreq_init(struct cpufreq_policy *policy) > >> > +{ > >> > + int ret; > >> > + > >> > + if (policy->cpu != 0) > >> > + return -EINVAL; > >> > >> Why? The problem here is when you hot-unplug cpu0, init would be called for > >> cpu1 and it would fail. > >> > > > > On imx6q, we can never hot-unplug cpu0. And all the cores of imx6q > > share the clock and voltage, so have to scale together. That's why > > we only need to do this init for cpu0. > > Ok, in that case too you don't need this code. init() wouldn't be > called for any other > cpu if policy->cpus is set correctly. So, that turns out to be a junk code. I'm seeing that the .init() will be called on cpu1 when removing the module. Shawn -- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html