compat-2.6: backport dev_pm_ops stuff and SIMPLE_DEV_PM_OPS
The 2.6.29 kernel has new struct dev_pm_ops [1] which are used
on the pci device to distinguish power management hooks for suspend
to RAM and hibernation. Older kernels don't have these so we need
to resort back to the good ol' suspend/resume. Fortunately the calls
are not so different so it should be possible to resuse the same
calls on compat code with only slight modifications.
The SIMPLE_DEV_PM_OPS macro is used as a helper to make the regular
suspend/resume calls be linked to the equivalent hibernation calls
as that is the same behaviour in older kernels. We backport
SIMPLE_DEV_PM_OPS only for kernels 2.6.29..2.6.31 and for older
kernels this is a no-op.
[1] http://lxr.linux.no/#linux+v2.6.29/include/linux/pm.h#L170
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>