diff options
| author | Rafael J. Wysocki <[email protected]> | 2013-09-20 15:40:41 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2013-09-20 15:40:41 +0200 |
| commit | d831a00510b9d400bf62464d8b11b158941348e6 (patch) | |
| tree | 77ecbe839dfc649223b92fbb1e8492876a731f68 /drivers/cpufreq/cpufreq-cpu0.c | |
| parent | 09359c8319b63242da73db7d944b1df6c4833e63 (diff) | |
| parent | 4dea5806d332f91d640d99943db99a5539e832c3 (diff) | |
Merge branch 'pm-cpufreq'
* pm-cpufreq:
cpufreq: return EEXIST instead of EBUSY for second registering
ARM: shmobile: change dev_id to cpu0 while registering cpu clock
ARM: i.MX: change dev_id to cpu0 while registering cpu clock
cpufreq: imx6q-cpufreq: assign cpu_dev correctly to cpu0 device
cpufreq: cpufreq-cpu0: assign cpu_dev correctly to cpu0 device
cpufreq: unlock correct rwsem while updating policy->cpu
cpufreq: Clear policy->cpus bits in __cpufreq_remove_dev_finish()
Diffstat (limited to 'drivers/cpufreq/cpufreq-cpu0.c')
| -rw-r--r-- | drivers/cpufreq/cpufreq-cpu0.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index cbfffa91ebdd..78c49d8e0f4a 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -12,6 +12,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/clk.h> +#include <linux/cpu.h> #include <linux/cpufreq.h> #include <linux/err.h> #include <linux/module.h> @@ -177,7 +178,11 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) struct device_node *np; int ret; - cpu_dev = &pdev->dev; + cpu_dev = get_cpu_device(0); + if (!cpu_dev) { + pr_err("failed to get cpu0 device\n"); + return -ENODEV; + } np = of_node_get(cpu_dev->of_node); if (!np) { |