compat: fix SIMPLE_DEV_PM_OPS() on kernel 2.6.29
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 11 Aug 2012 00:30:04 +0000 (02:30 +0200)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 11 Aug 2012 00:48:27 +0000 (17:48 -0700)
commite5fe9f6397822bb0d0a1a8440ec6489592b210c6
tree148063b0005b96200f9b4d8e5e5be9766ff644fd
parent92aaac94204a178c40aee939f7f3beeb067c5902
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>
include/linux/compat-2.6.29.h
include/linux/compat-2.6.32.h
include/linux/compat-2.6.33.h