diff options
author | Paul Cercueil <paul@crapouillou.net> | 2020-07-16 14:42:49 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-07-27 13:52:36 +0200 |
commit | 756a64ce349cf2646c60456b110f7f1756bb8699 (patch) | |
tree | 5e5a169509b22e0fc90ea0dc090592d72e107be4 /include/linux/pm.h | |
parent | 7a82e97a11b91a78e9da06ab3f70545953c07b5c (diff) | |
download | lwn-756a64ce349cf2646c60456b110f7f1756bb8699.tar.gz lwn-756a64ce349cf2646c60456b110f7f1756bb8699.zip |
PM: Make *_DEV_PM_OPS macros use __maybe_unused
This way, when the dev_pm_ops instance is not referenced anywhere, it
will simply be dropped by the compiler without a warning.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Ulf Hansson <ulf.hansson@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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index 1f227c518db3..a30a4b54df52 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -351,7 +351,7 @@ struct dev_pm_ops { * to RAM and hibernation. */ #define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ -const struct dev_pm_ops name = { \ +const struct dev_pm_ops __maybe_unused name = { \ SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ } @@ -369,7 +369,7 @@ const struct dev_pm_ops name = { \ * .runtime_resume(), respectively (and analogously for hibernation). */ #define UNIVERSAL_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ -const struct dev_pm_ops name = { \ +const struct dev_pm_ops __maybe_unused name = { \ SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ } |