From: Luis R. Rodriguez Date: Sun, 1 Apr 2012 03:31:06 +0000 (-0700) Subject: compat-wireless: add pm ops backport for p54 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=33f8b373abd69f356ab4b25d83f18e1457382862;p=openwrt%2Fstaging%2Fblogic.git compat-wireless: add pm ops backport for p54 This should fix compiling on 2.6.28. Signed-off-by: Luis R. Rodriguez --- diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch index 5858391fb68b..699318527bcf 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)