From 9a004428d77f1571c883b993d77ec64767b1959a Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Thu, 27 Nov 2014 06:07:52 +0530 Subject: [PATCH] cpufreq-dt: register cooling device from ->ready() callback Currently we are calling of_cpufreq_cooling_register() from ->init() callback. At this point of time cpufreq driver's policy isn't completely ready to be used as few of its fields/structure/pointers aren't yet initialized. Because of_cpufreq_cooling_register() tries to access policy with help of cpufreq_cpu_get() and then tries to get freq-table as well, these calls fail. To fix this, register the cooling device after the policy is ready to be used. And the right callback for it is the newly added ->ready() one. Signed-off-by: Viresh Kumar Reviewed-by: Eduardo Valentin Tested-by: Eduardo Valentin Reviewed-by: Lukasz Majewski Signed-off-by: Rafael J. Wysocki --- Reading git-format-patch failed