staging: ti-soc-thermal: defer probe if cpufreq is not ready
authorEduardo Valentin <eduardo.valentin@ti.com>
Mon, 8 Apr 2013 12:19:13 +0000 (08:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Apr 2013 17:35:08 +0000 (10:35 -0700)
commitf1553334236701f1c790d6dc800d8f327b6c5166
tree09d662e38f61e194ad431d17ae8945d83d20e6db
parent537eb9364ccdce6713f55dc004ceb76b63735ba9
staging: ti-soc-thermal: defer probe if cpufreq is not ready

When builtin compiled, there is a chance for this driver
be probed before cpufreq driver is up and running. In this
case, the cpucooling device can be wrong initialized.

Thus, this patch makes sure this driver is probed only
when cpufreq driver is ready. Whenever there is no
cpufreq driver registered, the probe will return -EPROBE_DEFER.

Tested-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ti-soc-thermal/ti-bandgap.c
drivers/staging/ti-soc-thermal/ti-thermal-common.c