cpufreq: Fix locking issues
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 7 Feb 2013 05:25:00 +0000 (10:55 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 9 Feb 2013 00:22:57 +0000 (01:22 +0100)
commit2eaa3e2df185997e92596ab14a2a67dde3876d2e
treee345655a2cb6c44d4c1fe9f3727fc4117f4ca1dc
parentfa1d8af47f42671fa82779582ca60948f876a73e
cpufreq: Fix locking issues

cpufreq core uses two locks:
- cpufreq_driver_lock: General lock for driver and cpufreq_cpu_data array.
- cpu_policy_rwsemfix locking: per CPU reader-writer semaphore designed to cure
  all cpufreq/hotplug/workqueue/etc related lock issues.

These locks were not used properly and are placed against their principle
(present before their definition) at various places. This patch is an attempt to
fix their use.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c