Commit eb23d91a authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Rafael J. Wysocki

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: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ccf7ce46
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
#define pr_fmt(fmt) "PM: " fmt #define pr_fmt(fmt) "PM: " fmt
#define dev_fmt pr_fmt
#include <linux/device.h> #include <linux/device.h>
#include <linux/export.h> #include <linux/export.h>
...@@ -449,8 +450,8 @@ static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info) ...@@ -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, static void pm_dev_err(struct device *dev, pm_message_t state, const char *info,
int error) int error)
{ {
pr_err("Device %s failed to %s%s: error %d\n", dev_err(dev, "failed to %s%s: error %d\n", pm_verb(state.event), info,
dev_name(dev), pm_verb(state.event), info, error); error);
} }
static void dpm_show_time(ktime_t starttime, pm_message_t state, int 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) ...@@ -1897,8 +1898,8 @@ int dpm_prepare(pm_message_t state)
error = 0; error = 0;
continue; continue;
} }
pr_info("Device %s not prepared for power transition: code %d\n", dev_info(dev, "not prepared for power transition: code %d\n",
dev_name(dev), error); error);
put_device(dev); put_device(dev);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment