blob: 8dae6c06c0cab77f92e2d445e319706bb100ce37 [file] [log] [blame]
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1404,6 +1404,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
@@ -1506,7 +1509,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);