From: Johannes Berg Date: Sat, 13 Apr 2013 13:17:30 +0000 (+0200) Subject: backports: improve SIMPLE_DEV_PM_OPS macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7d82f0ea460fd5677109fe964fb0b4d4a8fda5ff;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/backport/backport-include/linux/pm.h b/backport/backport-include/linux/pm.h index a78477cfda38..70f3a218f7db 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 */