compat: fix SIMPLE_DEV_PM_OPS() on kernel 2.6.29
This patch reworks this commit:
commit
8e661d67b1965afcfd9d3672803e2fc37765f6ef
Author: Johannes Berg <johannes.berg@intel.com>
Date: Thu Aug 2 22:15:05 2012 +0200
compat: handle pci suspend/resume on kernel 2.6.29
The functions for pci suspend and resume are now created by
compat_pci_suspend and compat_pci_resume and then used by
SIMPLE_DEV_PM_OPS. This way attributes like static, const and so on are
forwarded in the struct dev_pm_ops define on all kernel versions.
In addition this patch adds an own SIMPLE_DEV_PM_OPS() for kernel
2.6.32 overwriting the original, because in kernel 2.6.32 const is
needed for struct dev_pm_ops in pci drivers.
This is based on work done by Johannes Berg.
CC: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>