cpufreq: handle cpufreq being disabled for all exported function.
authorDirk Brandewie <dirk.j.brandewie@intel.com>
Thu, 17 Jan 2013 16:22:21 +0000 (16:22 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Feb 2013 23:01:14 +0000 (00:01 +0100)
commitd5aaffa9dd531c978c6f3fea06a2972653bd7fc8
tree4ce3e3de25daaaf25b5fa09f4596314b3b68de4d
parentb8eed8af94f9203e0cc39245ea335f4b8dc1ed31
cpufreq: handle cpufreq being disabled for all exported function.

When disable_cpufreq() is called some exported functions are still
being used that do not have a check for cpufreq being disabled.

Add a disabled check into cpufreq_cpu_get() to return NULL if
cpufreq is disabled this covers most of the exported functions. For
the exported functions that do not call cpufreq_cpu_get() add an
explicit check.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c