summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch
blob: 4f4cce9cd9960b4d5005f57bbc1d3f7904c25d0d (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
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1590,6 +1590,8 @@ static const struct pci_error_handlers a
 };
 
 #ifdef CONFIG_PM_SLEEP
+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
@@ -1615,7 +1617,12 @@ static struct pci_driver alx_driver = {
 	.remove      = alx_remove,
 	.shutdown    = alx_shutdown,
 	.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);