summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch
blob: b4fbfac87fb6007198538a0dacddae5956e015d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1395,6 +1395,9 @@ static int alx_resume(struct device *dev
 	return __alx_open(alx, true);
 }
 
+compat_pci_suspend(alx_suspend);
+compat_pci_resume(alx_resume);
+
 static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
 #define ALX_PM_OPS      (&alx_pm_ops)
 #else
@@ -1497,7 +1500,12 @@ static struct pci_driver alx_driver = {
 	.probe       = alx_probe,
 	.remove      = alx_remove,
 	.err_handler = &alx_err_handlers,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
 	.driver.pm   = ALX_PM_OPS,
+#elif defined(CONFIG_PM_SLEEP)
+	.suspend        = alx_suspend_compat,
+	.resume         = alx_resume_compat,
+#endif
 };
 
 module_pci_driver(alx_driver);