From: Thomas Renninger Date: Wed, 1 Feb 2006 10:36:04 +0000 (+0100) Subject: [CPUFREQ] Check whether driver init did not initialize current freq X-Git-Tag: v2.6.16-rc4~103^2~1 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a85f7bd310dbc9010309bfe70b6b02432a11ef59;p=linux-2.6-omap-h63xx.git [CPUFREQ] Check whether driver init did not initialize current freq Check whether driver init did not initialize current freq Signed-off-by: Thomas Renninger Signed-off-by: Dave Jones --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6bbe5825765..35eafbcf5ad 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1442,8 +1442,13 @@ int cpufreq_update_policy(unsigned int cpu) -> ask driver for current freq and notify governors about a change */ if (cpufreq_driver->get) { policy.cur = cpufreq_driver->get(cpu); - if (data->cur != policy.cur) - cpufreq_out_of_sync(cpu, data->cur, policy.cur); + if (!data->cur) { + dprintk("Driver did not initialize current freq"); + data->cur = policy.cur; + } else { + if (data->cur != policy.cur) + cpufreq_out_of_sync(cpu, data->cur, policy.cur); + } } ret = __cpufreq_set_policy(data, &policy);