aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/power/domain.c12
-rw-r--r--drivers/base/power/main.c21
-rw-r--r--drivers/base/power/trace.c2
-rw-r--r--drivers/base/power/wakeup.c4
4 files changed, 23 insertions, 16 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 2c334c01fc43..764e0f28979e 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -6,6 +6,8 @@
6 * This file is released under the GPLv2. 6 * This file is released under the GPLv2.
7 */ 7 */
8 8
9#define pr_fmt(fmt) "PM: " fmt
10
9#include <linux/delay.h> 11#include <linux/delay.h>
10#include <linux/kernel.h> 12#include <linux/kernel.h>
11#include <linux/io.h> 13#include <linux/io.h>
@@ -1657,8 +1659,8 @@ int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
1657 genpd_lock_nested(genpd, SINGLE_DEPTH_NESTING); 1659 genpd_lock_nested(genpd, SINGLE_DEPTH_NESTING);
1658 1660
1659 if (!list_empty(&subdomain->master_links) || subdomain->device_count) { 1661 if (!list_empty(&subdomain->master_links) || subdomain->device_count) {
1660 pr_warn("%s: unable to remove subdomain %s\n", genpd->name, 1662 pr_warn("%s: unable to remove subdomain %s\n",
1661 subdomain->name); 1663 genpd->name, subdomain->name);
1662 ret = -EBUSY; 1664 ret = -EBUSY;
1663 goto out; 1665 goto out;
1664 } 1666 }
@@ -1767,7 +1769,7 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
1767 if (ret) 1769 if (ret)
1768 return ret; 1770 return ret;
1769 } else if (!gov) { 1771 } else if (!gov) {
1770 pr_warn("%s : no governor for states\n", genpd->name); 1772 pr_warn("%s: no governor for states\n", genpd->name);
1771 } 1773 }
1772 1774
1773 device_initialize(&genpd->dev); 1775 device_initialize(&genpd->dev);
@@ -2514,7 +2516,7 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state,
2514 &entry_latency); 2516 &entry_latency);
2515 if (err) { 2517 if (err) {
2516 pr_debug(" * %pOF missing entry-latency-us property\n", 2518 pr_debug(" * %pOF missing entry-latency-us property\n",
2517 state_node); 2519 state_node);
2518 return -EINVAL; 2520 return -EINVAL;
2519 } 2521 }
2520 2522
@@ -2522,7 +2524,7 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state,
2522 &exit_latency); 2524 &exit_latency);
2523 if (err) { 2525 if (err) {
2524 pr_debug(" * %pOF missing exit-latency-us property\n", 2526 pr_debug(" * %pOF missing exit-latency-us property\n",
2525 state_node); 2527 state_node);
2526 return -EINVAL; 2528 return -EINVAL;
2527 } 2529 }
2528 2530
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 893ae464bfd6..929bc9d50db7 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -17,6 +17,8 @@
17 * subsystem list maintains. 17 * subsystem list maintains.
18 */ 18 */
19 19
20#define pr_fmt(fmt) "PM: " fmt
21
20#include <linux/device.h> 22#include <linux/device.h>
21#include <linux/export.h> 23#include <linux/export.h>
22#include <linux/mutex.h> 24#include <linux/mutex.h>
@@ -128,7 +130,7 @@ void device_pm_add(struct device *dev)
128 if (device_pm_not_required(dev)) 130 if (device_pm_not_required(dev))
129 return; 131 return;
130 132
131 pr_debug("PM: Adding info for %s:%s\n", 133 pr_debug("Adding info for %s:%s\n",
132 dev->bus ? dev->bus->name : "No Bus", dev_name(dev)); 134 dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
133 device_pm_check_callbacks(dev); 135 device_pm_check_callbacks(dev);
134 mutex_lock(&dpm_list_mtx); 136 mutex_lock(&dpm_list_mtx);
@@ -149,7 +151,7 @@ void device_pm_remove(struct device *dev)
149 if (device_pm_not_required(dev)) 151 if (device_pm_not_required(dev))
150 return; 152 return;
151 153
152 pr_debug("PM: Removing info for %s:%s\n", 154 pr_debug("Removing info for %s:%s\n",
153 dev->bus ? dev->bus->name : "No Bus", dev_name(dev)); 155 dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
154 complete_all(&dev->power.completion); 156 complete_all(&dev->power.completion);
155 mutex_lock(&dpm_list_mtx); 157 mutex_lock(&dpm_list_mtx);
@@ -168,7 +170,7 @@ void device_pm_remove(struct device *dev)
168 */ 170 */
169void device_pm_move_before(struct device *deva, struct device *devb) 171void device_pm_move_before(struct device *deva, struct device *devb)
170{ 172{
171 pr_debug("PM: Moving %s:%s before %s:%s\n", 173 pr_debug("Moving %s:%s before %s:%s\n",
172 deva->bus ? deva->bus->name : "No Bus", dev_name(deva), 174 deva->bus ? deva->bus->name : "No Bus", dev_name(deva),
173 devb->bus ? devb->bus->name : "No Bus", dev_name(devb)); 175 devb->bus ? devb->bus->name : "No Bus", dev_name(devb));
174 /* Delete deva from dpm_list and reinsert before devb. */ 176 /* Delete deva from dpm_list and reinsert before devb. */
@@ -182,7 +184,7 @@ void device_pm_move_before(struct device *deva, struct device *devb)
182 */ 184 */
183void device_pm_move_after(struct device *deva, struct device *devb) 185void device_pm_move_after(struct device *deva, struct device *devb)
184{ 186{
185 pr_debug("PM: Moving %s:%s after %s:%s\n", 187 pr_debug("Moving %s:%s after %s:%s\n",
186 deva->bus ? deva->bus->name : "No Bus", dev_name(deva), 188 deva->bus ? deva->bus->name : "No Bus", dev_name(deva),
187 devb->bus ? devb->bus->name : "No Bus", dev_name(devb)); 189 devb->bus ? devb->bus->name : "No Bus", dev_name(devb));
188 /* Delete deva from dpm_list and reinsert after devb. */ 190 /* Delete deva from dpm_list and reinsert after devb. */
@@ -195,7 +197,7 @@ void device_pm_move_after(struct device *deva, struct device *devb)
195 */ 197 */
196void device_pm_move_last(struct device *dev) 198void device_pm_move_last(struct device *dev)
197{ 199{
198 pr_debug("PM: Moving %s:%s to end of list\n", 200 pr_debug("Moving %s:%s to end of list\n",
199 dev->bus ? dev->bus->name : "No Bus", dev_name(dev)); 201 dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
200 list_move_tail(&dev->power.entry, &dpm_list); 202 list_move_tail(&dev->power.entry, &dpm_list);
201} 203}
@@ -418,8 +420,8 @@ static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info)
418static void pm_dev_err(struct device *dev, pm_message_t state, const char *info, 420static void pm_dev_err(struct device *dev, pm_message_t state, const char *info,
419 int error) 421 int error)
420{ 422{
421 printk(KERN_ERR "PM: Device %s failed to %s%s: error %d\n", 423 pr_err("Device %s failed to %s%s: error %d\n",
422 dev_name(dev), pm_verb(state.event), info, error); 424 dev_name(dev), pm_verb(state.event), info, error);
423} 425}
424 426
425static void dpm_show_time(ktime_t starttime, pm_message_t state, int error, 427static void dpm_show_time(ktime_t starttime, pm_message_t state, int error,
@@ -2022,8 +2024,7 @@ int dpm_prepare(pm_message_t state)
2022 error = 0; 2024 error = 0;
2023 continue; 2025 continue;
2024 } 2026 }
2025 printk(KERN_INFO "PM: Device %s not prepared " 2027 pr_info("Device %s not prepared for power transition: code %d\n",
2026 "for power transition: code %d\n",
2027 dev_name(dev), error); 2028 dev_name(dev), error);
2028 put_device(dev); 2029 put_device(dev);
2029 break; 2030 break;
@@ -2062,7 +2063,7 @@ EXPORT_SYMBOL_GPL(dpm_suspend_start);
2062void __suspend_report_result(const char *function, void *fn, int ret) 2063void __suspend_report_result(const char *function, void *fn, int ret)
2063{ 2064{
2064 if (ret) 2065 if (ret)
2065 printk(KERN_ERR "%s(): %pF returns %d\n", function, fn, ret); 2066 pr_err("%s(): %pF returns %d\n", function, fn, ret);
2066} 2067}
2067EXPORT_SYMBOL_GPL(__suspend_report_result); 2068EXPORT_SYMBOL_GPL(__suspend_report_result);
2068 2069
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index b11f47a1e819..2bd9d2c744ca 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -7,6 +7,8 @@
7 * devices may be working. 7 * devices may be working.
8 */ 8 */
9 9
10#define pr_fmt(fmt) "PM: " fmt
11
10#include <linux/pm-trace.h> 12#include <linux/pm-trace.h>
11#include <linux/export.h> 13#include <linux/export.h>
12#include <linux/rtc.h> 14#include <linux/rtc.h>
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index f1fee72ed970..d0e77d56c1d9 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -6,6 +6,8 @@
6 * This file is released under the GPLv2. 6 * This file is released under the GPLv2.
7 */ 7 */
8 8
9#define pr_fmt(fmt) "PM: " fmt
10
9#include <linux/device.h> 11#include <linux/device.h>
10#include <linux/slab.h> 12#include <linux/slab.h>
11#include <linux/sched/signal.h> 13#include <linux/sched/signal.h>
@@ -853,7 +855,7 @@ bool pm_wakeup_pending(void)
853 raw_spin_unlock_irqrestore(&events_lock, flags); 855 raw_spin_unlock_irqrestore(&events_lock, flags);
854 856
855 if (ret) { 857 if (ret) {
856 pr_debug("PM: Wakeup pending, aborting suspend\n"); 858 pr_debug("Wakeup pending, aborting suspend\n");
857 pm_print_active_wakeup_sources(); 859 pm_print_active_wakeup_sources();
858 } 860 }
859 861