]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: SPEAr: Instantiate as platform_driver
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 10 Mar 2014 10:13:18 +0000 (15:43 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 12 Mar 2014 00:06:01 +0000 (01:06 +0100)
commitfede67c67f9cc63fb025c312bc38c78a445f56c1
tree86b3ce294a01a4a1c12dddb24d0ae5cd81a9c0a5
parent40c238f79df6d55243e42fe6a267d7518ab98372
cpufreq: SPEAr: Instantiate as platform_driver

As multiplatform build is being adopted by more and more
ARM platforms, initcall function should be used very carefully.
For example, when SPEAr cpufreq driver is enabled on a kernel
booted on a non-SPEAr board, we will get following boot time error:

spear_cpufreq: Invalid cpufreq_tbl

To eliminate this undesired the effect, the patch changes SPEAr
driver to have it instantiated as a platform_driver. Then it will
only run on platforms that create the platform_device "spear-cpufreq".

This patch also creates platform node for SPEAr13xx boards.

Reported-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/arm/mach-spear/spear1310.c
arch/arm/mach-spear/spear1340.c
drivers/cpufreq/spear-cpufreq.c