diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-12 22:51:55 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-15 00:55:43 +0200 |
commit | 604d895857c2fc6748feb805c2290a60491eed43 (patch) | |
tree | 2ebcdd7c2029b13e67a576980a97e0c87638a193 /drivers/base/power | |
parent | 235d81a630ca2d39818da96f0c14bc960ffbaeb5 (diff) |
PM / sleep: Print timing information if debug is enabled
Avoid printing the device suspend/resume timing information if
CONFIG_PM_DEBUG is not set to reduce the log noise level.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 9faee1c893e5..253f860e8981 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -417,6 +417,7 @@ static void pm_dev_err(struct device *dev, pm_message_t state, char *info, dev_name(dev), pm_verb(state.event), info, error); } +#ifdef CONFIG_PM_DEBUG static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) { ktime_t calltime; @@ -433,6 +434,9 @@ static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) info ?: "", info ? " " : "", pm_verb(state.event), usecs / USEC_PER_MSEC, usecs % USEC_PER_MSEC); } +#else +static inline void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) {} +#endif /* CONFIG_PM_DEBUG */ static int dpm_run_callback(pm_callback_t cb, struct device *dev, pm_message_t state, char *info) |