cpuidle: fix lock contention in the idle path
[firefly-linux-kernel-4.4.55.git] / drivers / cpuidle / driver.c
index 3af841fb397a0cda095b9ca794c04271c5164332..c2b281afe0ed03ce13a3a3122d96084319a93635 100644 (file)
@@ -235,16 +235,10 @@ EXPORT_SYMBOL_GPL(cpuidle_get_driver);
  */
 struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev)
 {
-       struct cpuidle_driver *drv;
-
        if (!dev)
                return NULL;
 
-       spin_lock(&cpuidle_driver_lock);
-       drv = __cpuidle_get_cpu_driver(dev->cpu);
-       spin_unlock(&cpuidle_driver_lock);
-
-       return drv;
+       return __cpuidle_get_cpu_driver(dev->cpu);
 }
 EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver);