aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-03 18:34:11 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-03 18:51:30 -0500
commit6ed23b806e73bdd5b17722df507b0f4570c606b6 (patch)
tree6c03cc156649f8d15eb301a7d86cce3c4840f0a4 /include/linux/pm.h
parenta1518d3bbc15d89ccf33056ffa8b3a63de118d24 (diff)
PM: Merge the SET*_RUNTIME_PM_OPS() macros
The SET_PM_RUNTIME_PM_OPS() and SET_RUNTIME_PM_OPS() macros are identical except that one of them is not empty for CONFIG_PM set, while the other one is not empty for CONFIG_PM_RUNTIME set, respectively. However, after commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so one of these macros is now redundant. For this reason, replace SET_PM_RUNTIME_PM_OPS() with SET_RUNTIME_PM_OPS() everywhere and redefine the SET_PM_RUNTIME_PM_OPS symbol as SET_RUNTIME_PM_OPS in case new code is starting to use the macro being removed here. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r--include/linux/pm.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 53b56cf5db3f..1dc338f6d4a9 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -342,7 +342,7 @@ struct dev_pm_ops {
342#define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) 342#define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
343#endif 343#endif
344 344
345#ifdef CONFIG_PM_RUNTIME 345#ifdef CONFIG_PM
346#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ 346#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
347 .runtime_suspend = suspend_fn, \ 347 .runtime_suspend = suspend_fn, \
348 .runtime_resume = resume_fn, \ 348 .runtime_resume = resume_fn, \
@@ -351,14 +351,7 @@ struct dev_pm_ops {
351#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) 351#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
352#endif 352#endif
353 353
354#ifdef CONFIG_PM 354#define SET_PM_RUNTIME_PM_OPS SET_RUNTIME_PM_OPS
355#define SET_PM_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
356 .runtime_suspend = suspend_fn, \
357 .runtime_resume = resume_fn, \
358 .runtime_idle = idle_fn,
359#else
360#define SET_PM_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
361#endif
362 355
363/* 356/*
364 * Use this if you want to use the same suspend and resume callbacks for suspend 357 * Use this if you want to use the same suspend and resume callbacks for suspend