cpufreq: Print driver name if cpufreq_suspend() fails
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 21 Aug 2019 23:16:32 +0000 (16:16 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 22 Aug 2019 07:27:25 +0000 (09:27 +0200)
Instead of printing the policy, which is incidentally a kernel pointer,
so with limited interest, print the cpufreq driver name that failed to
be suspend, which is more useful for debugging.

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

index 26d82e0a2de58789f97bbd2771d6fc39a75f9f21..5bfda2bfdf4f2665d840af18962c2f8e097be858 100644 (file)
@@ -1807,8 +1807,8 @@ void cpufreq_suspend(void)
                }
 
                if (cpufreq_driver->suspend && cpufreq_driver->suspend(policy))
-                       pr_err("%s: Failed to suspend driver: %p\n", __func__,
-                               policy);
+                       pr_err("%s: Failed to suspend driver: %s\n", __func__,
+                               cpufreq_driver->name);
        }
 
 suspend: