Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[firefly-linux-kernel-4.4.55.git] / drivers / cpuidle / sysfs.c
index 8739cc05228ca97512a60b9cc3770097f3a044aa..e918b6d0caf7558025578be747b920003adb2698 100644 (file)
@@ -52,11 +52,12 @@ static ssize_t show_current_driver(struct device *dev,
                                   char *buf)
 {
        ssize_t ret;
-       struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver();
+       struct cpuidle_driver *drv;
 
        spin_lock(&cpuidle_driver_lock);
-       if (cpuidle_driver)
-               ret = sprintf(buf, "%s\n", cpuidle_driver->name);
+       drv = cpuidle_get_driver();
+       if (drv)
+               ret = sprintf(buf, "%s\n", drv->name);
        else
                ret = sprintf(buf, "none\n");
        spin_unlock(&cpuidle_driver_lock);