aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-imx6q.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/mach-imx6q.c')
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c9
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 47ebc36636a7..3be0fa0e9796 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -234,10 +234,15 @@ put_node:
234 of_node_put(np); 234 of_node_put(np);
235} 235}
236 236
237static void __init imx6q_opp_init(struct device *cpu_dev) 237static void __init imx6q_opp_init(void)
238{ 238{
239 struct device_node *np; 239 struct device_node *np;
240 struct device *cpu_dev = get_cpu_device(0);
240 241
242 if (!cpu_dev) {
243 pr_warn("failed to get cpu0 device\n");
244 return;
245 }
241 np = of_node_get(cpu_dev->of_node); 246 np = of_node_get(cpu_dev->of_node);
242 if (!np) { 247 if (!np) {
243 pr_warn("failed to find cpu0 node\n"); 248 pr_warn("failed to find cpu0 node\n");
@@ -269,7 +274,7 @@ static void __init imx6q_init_late(void)
269 imx6q_cpuidle_init(); 274 imx6q_cpuidle_init();
270 275
271 if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) { 276 if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {
272 imx6q_opp_init(&imx6q_cpufreq_pdev.dev); 277 imx6q_opp_init();
273 platform_device_register(&imx6q_cpufreq_pdev); 278 platform_device_register(&imx6q_cpufreq_pdev);
274 } 279 }
275} 280}