diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2021-01-26 22:29:40 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-01-27 19:21:17 +0100 |
commit | eb23d91af55bc2369fe3f0aa6997e72eb20e16fe (patch) | |
tree | 466555c3573e6d4ee95fb0e69892d70f10225359 /drivers/base/power | |
parent | PM: sleep: No need to check PF_WQ_WORKER in thaw_kernel_threads() (diff) | |
download | linux-eb23d91af55bc2369fe3f0aa6997e72eb20e16fe.tar.xz linux-eb23d91af55bc2369fe3f0aa6997e72eb20e16fe.zip |
PM: sleep: Use dev_printk() when possible
Use dev_printk() when possible to make messages more consistent with other
device-related messages.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power')
-rw-r--r-- | drivers/base/power/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 46793276598d..f893c3c5af07 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -16,6 +16,7 @@ */ #define pr_fmt(fmt) "PM: " fmt +#define dev_fmt pr_fmt #include <linux/device.h> #include <linux/export.h> @@ -449,8 +450,8 @@ static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info) static void pm_dev_err(struct device *dev, pm_message_t state, const char *info, int error) { - pr_err("Device %s failed to %s%s: error %d\n", - dev_name(dev), pm_verb(state.event), info, error); + dev_err(dev, "failed to %s%s: error %d\n", pm_verb(state.event), info, + error); } static void dpm_show_time(ktime_t starttime, pm_message_t state, int error, @@ -1897,8 +1898,8 @@ int dpm_prepare(pm_message_t state) error = 0; continue; } - pr_info("Device %s not prepared for power transition: code %d\n", - dev_name(dev), error); + dev_info(dev, "not prepared for power transition: code %d\n", + error); put_device(dev); break; } |