summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.patch
blob: 3220c3f8a14422a2f01754feb9a00e15bd33434a (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
26
27
28
29
30
31
32
33
34
35
36
37
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -4935,8 +4935,17 @@ il_pci_resume(struct device *device)
 	return 0;
 }
 
+compat_pci_suspend(il_pci_suspend)
+compat_pci_resume(il_pci_resume)
+
 SIMPLE_DEV_PM_OPS(il_pm_ops, il_pci_suspend, il_pci_resume);
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
 EXPORT_SYMBOL(il_pm_ops);
+#else
+EXPORT_SYMBOL(il_pci_suspend_compat);
+EXPORT_SYMBOL(il_pci_resume_compat);
+#endif
 
 #endif /* CONFIG_PM_SLEEP */
 
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1835,7 +1835,14 @@ __le32 il_add_beacon_time(struct il_priv
 			  u32 beacon_interval);
 
 #ifdef CONFIG_PM_SLEEP
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
+int il_pci_suspend_compat(struct pci_dev *pdev, pm_message_t state);
+int il_pci_resume_compat(struct pci_dev *pdev);
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
+extern struct dev_pm_ops il_pm_ops;
+#else
 extern const struct dev_pm_ops il_pm_ops;
+#endif
 
 #define IL_LEGACY_PM_OPS	(&il_pm_ops)