summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@frijolero.org>2012-03-31 20:31:06 -0700
committerLuis R. Rodriguez <mcgrof@frijolero.org>2012-03-31 20:31:06 -0700
commit33f8b373abd69f356ab4b25d83f18e1457382862 (patch)
treee059f6c22bc9e4117725fcb49a2f814005a36bd5
parentdb133a867d4c0ee31211c62205b5c5287acb30a9 (diff)
compat-wireless: add pm ops backport for p54
This should fix compiling on 2.6.28. Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
-rw-r--r--patches/11-dev-pm-ops.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch
index 5858391f..69931852 100644
--- a/patches/11-dev-pm-ops.patch
+++ b/patches/11-dev-pm-ops.patch
@@ -367,3 +367,37 @@ calls on compat code with only slight modifications.
};
static int __init rtl92se_module_init(void)
+--- a/drivers/net/wireless/p54/p54pci.c
++++ b/drivers/net/wireless/p54/p54pci.c
+@@ -645,14 +645,10 @@ static int p54p_resume(struct device *de
+ return pci_set_power_state(pdev, PCI_D0);
+ }
+
+-static const struct dev_pm_ops p54pci_pm_ops = {
+- .suspend = p54p_suspend,
+- .resume = p54p_resume,
+- .freeze = p54p_suspend,
+- .thaw = p54p_resume,
+- .poweroff = p54p_suspend,
+- .restore = p54p_resume,
+-};
++compat_pci_suspend(p54p_suspend)
++compat_pci_resume(p54p_resume)
++
++static SIMPLE_DEV_PM_OPS(p54_pm_ops, p54_suspend, p54_resume);
+
+ #define P54P_PM_OPS (&p54pci_pm_ops)
+ #else
+@@ -664,7 +660,12 @@ static struct pci_driver p54p_driver = {
+ .id_table = p54p_table,
+ .probe = p54p_probe,
+ .remove = __devexit_p(p54p_remove),
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ .driver.pm = P54P_PM_OPS,
++#elif defined(CONFIG_PM)
++ .suspend = p54_suspend_compat,
++ .resume = p54_resume_compat,
++#endif
+ };
+
+ static int __init p54p_init(void)