diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-imx6q.c')
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 85a1b51346c8..90372a21087f 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -233,10 +233,15 @@ put_node: | |||
233 | of_node_put(np); | 233 | of_node_put(np); |
234 | } | 234 | } |
235 | 235 | ||
236 | static void __init imx6q_opp_init(struct device *cpu_dev) | 236 | static void __init imx6q_opp_init(void) |
237 | { | 237 | { |
238 | struct device_node *np; | 238 | struct device_node *np; |
239 | struct device *cpu_dev = get_cpu_device(0); | ||
239 | 240 | ||
241 | if (!cpu_dev) { | ||
242 | pr_warn("failed to get cpu0 device\n"); | ||
243 | return; | ||
244 | } | ||
240 | np = of_node_get(cpu_dev->of_node); | 245 | np = of_node_get(cpu_dev->of_node); |
241 | if (!np) { | 246 | if (!np) { |
242 | pr_warn("failed to find cpu0 node\n"); | 247 | pr_warn("failed to find cpu0 node\n"); |
@@ -268,7 +273,7 @@ static void __init imx6q_init_late(void) | |||
268 | imx6q_cpuidle_init(); | 273 | imx6q_cpuidle_init(); |
269 | 274 | ||
270 | if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) { | 275 | if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) { |
271 | imx6q_opp_init(&imx6q_cpufreq_pdev.dev); | 276 | imx6q_opp_init(); |
272 | platform_device_register(&imx6q_cpufreq_pdev); | 277 | platform_device_register(&imx6q_cpufreq_pdev); |
273 | } | 278 | } |
274 | } | 279 | } |