aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-07-18 18:03:29 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-18 18:03:29 -0400
commitd52fdf13377c25e7a5620c6bec406bbf6a46d443 (patch)
treebbcce588f5753d3174956324c4265c3235611543 /drivers/base
parent7791bd230c6fe65348456564743f99fa066f00e7 (diff)
parent11388c87d2abca1f01975ced28ce9eacea239104 (diff)
Merge branch 'pm-sleep'
* pm-sleep: PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock PM / Sleep: Add missing static storage class specifiers in main.c PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unset PM / Hibernate: Print hibernation/thaw progress indicator one line at a time. PM / Sleep: Separate printing suspend times from initcall_debug PM / Sleep: add knob for printing device resume times ftrace: Disable function tracing during suspend/resume and hibernation, again PM / Hibernate: Enable suspend to both for in-kernel hibernation.
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/main.c12
-rw-r--r--drivers/base/power/sysfs.c4
2 files changed, 10 insertions, 6 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 63048f79de5f..61a891dda380 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -45,10 +45,10 @@ typedef int (*pm_callback_t)(struct device *);
45 */ 45 */
46 46
47LIST_HEAD(dpm_list); 47LIST_HEAD(dpm_list);
48LIST_HEAD(dpm_prepared_list); 48static LIST_HEAD(dpm_prepared_list);
49LIST_HEAD(dpm_suspended_list); 49static LIST_HEAD(dpm_suspended_list);
50LIST_HEAD(dpm_late_early_list); 50static LIST_HEAD(dpm_late_early_list);
51LIST_HEAD(dpm_noirq_list); 51static LIST_HEAD(dpm_noirq_list);
52 52
53struct suspend_stats suspend_stats; 53struct suspend_stats suspend_stats;
54static DEFINE_MUTEX(dpm_list_mtx); 54static DEFINE_MUTEX(dpm_list_mtx);
@@ -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 (initcall_debug) { 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 (initcall_debug) { 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),
diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c
index 48be2ad4dd2c..b91dc6f1e914 100644
--- a/drivers/base/power/sysfs.c
+++ b/drivers/base/power/sysfs.c
@@ -474,6 +474,8 @@ static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL);
474 474
475#endif 475#endif
476 476
477#ifdef CONFIG_PM_SLEEP
478
477static ssize_t async_show(struct device *dev, struct device_attribute *attr, 479static ssize_t async_show(struct device *dev, struct device_attribute *attr,
478 char *buf) 480 char *buf)
479{ 481{
@@ -500,6 +502,8 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
500} 502}
501 503
502static DEVICE_ATTR(async, 0644, async_show, async_store); 504static DEVICE_ATTR(async, 0644, async_show, async_store);
505
506#endif
503#endif /* CONFIG_PM_ADVANCED_DEBUG */ 507#endif /* CONFIG_PM_ADVANCED_DEBUG */
504 508
505static struct attribute *power_attrs[] = { 509static struct attribute *power_attrs[] = {