acx-mac80211: fix build after recent mac80211 update and refresh patches
[openwrt/svn-archive/archive.git] / package / kernel / acx-mac80211 / patches / 001-pci-mem-Fix-3.8-build.patch
1 From 8a0f5890019bf43f4bc95ef0754b062ddfcfa9cd Mon Sep 17 00:00:00 2001
2 From: Oliver Winker <oliver@oli1170.net>
3 Date: Sun, 10 Mar 2013 21:04:23 +0100
4 Subject: [PATCH 1/3] pci, mem: Fix 3.8 build
5
6 __devexit and __devinit not used anymore in 3.8
7
8 Signed-off-by: Reinhard Karcher <reinhard.karcher@gmx.net>
9 Signed-off-by: Oliver Winker <oliver@oli1170.net>
10 ---
11 mem.c | 13 ++++++++++++-
12 pci.c | 26 +++++++++++++++++++++++++-
13 2 files changed, 37 insertions(+), 2 deletions(-)
14
15 --- a/mem.c
16 +++ b/mem.c
17 @@ -2216,7 +2216,11 @@ int acx100mem_ioctl_set_phy_amp_bias(str
18 * ==================================================
19 */
20
21 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
22 static int __devinit acxmem_probe(struct platform_device *pdev)
23 +#else
24 +static int acxmem_probe(struct platform_device *pdev)
25 +#endif
26 {
27 acx_device_t *adev = NULL;
28 const char *chip_name;
29 @@ -2392,7 +2396,11 @@ static int __devinit acxmem_probe(struct
30 * pdev - ptr to PCI device structure containing info about pci
31 * configuration
32 */
33 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
34 static int __devexit acxmem_remove(struct platform_device *pdev)
35 +#else
36 +static int acxmem_remove(struct platform_device *pdev)
37 +#endif
38 {
39 struct ieee80211_hw *hw = (struct ieee80211_hw *)
40 platform_get_drvdata(pdev);
41 @@ -2594,8 +2602,11 @@ static struct platform_driver acxmem_dri
42 .name = "acx-mem",
43 },
44 .probe = acxmem_probe,
45 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
46 .remove = __devexit_p(acxmem_remove),
47 -
48 +#else
49 + .remove = acxmem_remove,
50 +#endif
51 #ifdef CONFIG_PM
52 .suspend = acxmem_e_suspend,
53 .resume = acxmem_e_resume
54 --- a/pci.c
55 +++ b/pci.c
56 @@ -1039,7 +1039,11 @@ int acx100pci_ioctl_set_phy_amp_bias(str
57 * id - ptr to the device id entry that matched this device
58 */
59 #ifdef CONFIG_PCI
60 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
61 static int __devinit acxpci_probe(struct pci_dev *pdev,
62 +#else
63 +static int acxpci_probe(struct pci_dev *pdev,
64 +#endif
65 const struct pci_device_id *id)
66 {
67 unsigned long mem_region1 = 0;
68 @@ -1292,7 +1296,11 @@ static int __devinit acxpci_probe(struct
69 *
70 * pdev - ptr to PCI device structure containing info about pci configuration
71 */
72 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
73 static void __devexit acxpci_remove(struct pci_dev *pdev)
74 +#else
75 +static void acxpci_remove(struct pci_dev *pdev)
76 +#endif
77 {
78 struct ieee80211_hw *hw
79 = (struct ieee80211_hw *) pci_get_drvdata(pdev);
80 @@ -1505,7 +1513,11 @@ static struct pci_driver acxpci_driver =
81 .name = "acx_pci",
82 .id_table = acxpci_id_tbl,
83 .probe = acxpci_probe,
84 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
85 .remove = __devexit_p(acxpci_remove),
86 +#else
87 + .remove = acxpci_remove,
88 +#endif
89 #ifdef CONFIG_PM
90 .suspend = acxpci_e_suspend,
91 .resume = acxpci_e_resume
92 @@ -1603,8 +1615,12 @@ static struct vlynq_device_id acx_vlynq_
93 };
94
95
96 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
97 static __devinit int vlynq_probe(struct vlynq_device *vdev,
98 - struct vlynq_device_id *id)
99 +#else
100 +static int vlynq_probe(struct vlynq_device *vdev,
101 +#endif
102 + struct vlynq_device_id *id)
103 {
104 int result = -EIO, i;
105 u32 addr;
106 @@ -1785,7 +1801,11 @@ static __devinit int vlynq_probe(struct
107 return result;
108 }
109
110 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
111 static __devexit void vlynq_remove(struct vlynq_device *vdev)
112 +#else
113 +static void vlynq_remove(struct vlynq_device *vdev)
114 +#endif
115 {
116 struct ieee80211_hw *hw = vlynq_get_drvdata(vdev);
117 acx_device_t *adev = hw2adev(hw);
118 @@ -1851,7 +1871,11 @@ static struct vlynq_driver acxvlynq_driv
119 .name = "acx_vlynq",
120 .id_table = acx_vlynq_id,
121 .probe = vlynq_probe,
122 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
123 .remove = __devexit_p(vlynq_remove),
124 +#else
125 + .remove = vlynq_remove,
126 +#endif
127 };
128 #endif /* CONFIG_VLYNQ */
129