diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-04-13 15:17:30 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-15 11:32:48 +0200 |
commit | 7d82f0ea460fd5677109fe964fb0b4d4a8fda5ff (patch) | |
tree | 74cf51b57ff674aeb762d2c224d55b0ffe7567ed /backport | |
parent | ee535f221c4919a73c226f6f1040c96e35265260 (diff) |
backports: improve SIMPLE_DEV_PM_OPS macro
To avoid warnings on old kernels, improve the macro
and give it some content rather than nothing.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/backport-include/linux/pm.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backport/backport-include/linux/pm.h b/backport/backport-include/linux/pm.h index a78477cf..70f3a218 100644 --- a/backport/backport-include/linux/pm.h +++ b/backport/backport-include/linux/pm.h @@ -51,7 +51,10 @@ struct dev_pm_ops name = { \ .restore = resume_fn, \ } #else -#define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) +#define ___BACKPORT_PASTE(a, b) a##b +#define __BACKPORT_PASTE(a, b) ___BACKPORT_PASTE(a,b) +#define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ + struct {} __maybe_unused __BACKPORT_PASTE(__backport_avoid_warning_, __LINE__) #endif /* >= 2.6.29 */ #endif /* < 2.6.32 */ |