aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-06-20 18:19:33 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-01 07:31:23 -0400
commitb2df1d4f8b95d9d1e3f064cef02fc5c5116b05cf (patch)
tree6e891ad6ad748ea737ab5774983f90d9be720446 /drivers/base/power/main.c
parent4b7760ba0dd3319f66886ab2335a0fbecdbc808a (diff)
PM / Sleep: Separate printing suspend times from initcall_debug
Change the behavior of the newly introduced /sys/power/pm_print_times attribute so that its initial value depends on initcall_debug, but setting it to 0 will cause device suspend/resume times not to be printed, even if initcall_debug has been set. This way, the people who use initcall_debug for reasons other than PM debugging will be able to switch the suspend/resume times printing off, if need be. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r--drivers/base/power/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 6e4db96958d1..df5f41d2ec95 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -166,7 +166,7 @@ static ktime_t initcall_debug_start(struct device *dev)
166{ 166{
167 ktime_t calltime = ktime_set(0, 0); 167 ktime_t calltime = ktime_set(0, 0);
168 168
169 if (pm_print_times) { 169 if (pm_print_times_enabled) {
170 pr_info("calling %s+ @ %i, parent: %s\n", 170 pr_info("calling %s+ @ %i, parent: %s\n",
171 dev_name(dev), task_pid_nr(current), 171 dev_name(dev), task_pid_nr(current),
172 dev->parent ? dev_name(dev->parent) : "none"); 172 dev->parent ? dev_name(dev->parent) : "none");
@@ -181,7 +181,7 @@ static void initcall_debug_report(struct device *dev, ktime_t calltime,
181{ 181{
182 ktime_t delta, rettime; 182 ktime_t delta, rettime;
183 183
184 if (pm_print_times) { 184 if (pm_print_times_enabled) {
185 rettime = ktime_get(); 185 rettime = ktime_get();
186 delta = ktime_sub(rettime, calltime); 186 delta = ktime_sub(rettime, calltime);
187 pr_info("call %s+ returned %d after %Ld usecs\n", dev_name(dev), 187 pr_info("call %s+ returned %d after %Ld usecs\n", dev_name(dev),