From 4d33d40801e7cc85c3b0969683e7e93db1627371 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 21 Jan 2012 14:43:34 +0100 Subject: [PATCH] compat-wireless: backport dev_pm_ops for bcma bcma now also uses dev_pm_ops which does not work with older kernel versions. Just backport it like it was done for the other drivers. This should also go into compat-wireless-stable-3.3. Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- patches/11-dev-pm-ops.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch index d0446d85fea5..6dd3e6c3f014 100644 --- a/patches/11-dev-pm-ops.patch +++ b/patches/11-dev-pm-ops.patch @@ -7,6 +7,32 @@ calls on compat code with only slight modifications. [1] http://lxr.linux.no/#linux+v2.6.29/include/linux/pm.h#L170 +--- a/drivers/bcma/host_pci.c ++++ b/drivers/bcma/host_pci.c +@@ -255,6 +255,10 @@ static int bcma_host_pci_resume(struct d + + static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend, + bcma_host_pci_resume); ++ ++compat_pci_suspend(bcma_host_pci_suspend) ++compat_pci_resume(bcma_host_pci_resume) ++ + #define BCMA_PM_OPS (&bcma_pm_ops) + + #else /* CONFIG_PM */ +@@ -278,7 +282,12 @@ static struct pci_driver bcma_pci_bridge + .id_table = bcma_pci_bridge_tbl, + .probe = bcma_host_pci_probe, + .remove = bcma_host_pci_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = BCMA_PM_OPS, ++#elif defined(CONFIG_PM) ++ .suspend = bcma_host_pci_suspend_compat, ++ .resume = bcma_host_pci_resume_compat, ++#endif + }; + + int __init bcma_host_pci_init(void) --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c @@ -2900,6 +2900,9 @@ static struct pci_error_handlers atl1c_e -- 2.30.2