[PATCH v2] cpufreq: instantiate cpufreq-cpu0 as a platform_driver
Viresh Kumar
viresh.kumar at linaro.org
Mon Jan 28 23:51:56 EST 2013
On Tue, Jan 29, 2013 at 8:23 AM, Shawn Guo <shawn.guo at linaro.org> wrote:
> As multiplatform build is being adopted by more and more ARM platforms,
> initcall function should be used very carefully. For example, when
> GENERIC_CPUFREQ_CPU0 is built in the kernel, cpu0_cpufreq_driver_init()
> will be called on all the platforms to initialize cpufreq-cpu0 driver.
>
> To eliminate this undesired the effect, the patch changes cpufreq-cpu0
> driver to have it instantiated as a platform_driver. Then it will only
> run on platforms that create the platform_device "cpufreq-cpu0".
>
> Along with the change, it also changes cpu_dev to be &pdev->dev,
> so that managed functions can start working, and module build gets
> supported too.
>
> The existing users of cpufreq-cpu0 driver highbank and am33xx are also
> updated accordingly to adapt the changes.
>
> Signed-off-by: Shawn Guo <shawn.guo at linaro.org>
> Cc: Mark Langsdorf <mark.langsdorf at calxeda.com>
> Cc: AnilKumar Ch <anilkumar at ti.com>
> Cc: Tony Lindgren <tony at atomide.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
Reviewed-by: Viresh Kumar <viresh.kumar at linaro.org>
More information about the linux-arm-kernel
mailing list