diff options
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 @@ | |||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
13 | 13 | ||
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/cpu.h> | ||
15 | #include <linux/cpufreq.h> | 16 | #include <linux/cpufreq.h> |
16 | #include <linux/err.h> | 17 | #include <linux/err.h> |
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
@@ -177,7 +178,11 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) | |||
177 | struct device_node *np; | 178 | struct device_node *np; |
178 | int ret; | 179 | int ret; |
179 | 180 | ||
180 | cpu_dev = &pdev->dev; | 181 | cpu_dev = get_cpu_device(0); |
182 | if (!cpu_dev) { | ||
183 | pr_err("failed to get cpu0 device\n"); | ||
184 | return -ENODEV; | ||
185 | } | ||
181 | 186 | ||
182 | np = of_node_get(cpu_dev->of_node); | 187 | np = of_node_get(cpu_dev->of_node); |
183 | if (!np) { | 188 | if (!np) { |