2ee8c2ab506a2e204fd447ddeca600cf536b7629
[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 diff --git a/mem.c b/mem.c
16 index 87e01f1..f1ff7e2 100644
17 --- a/mem.c
18 +++ b/mem.c
19 @@ -2216,7 +2216,11 @@ int acx100mem_ioctl_set_phy_amp_bias(struct ieee80211_hw *hw,
20 * ==================================================
21 */
22
23 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
24 static int __devinit acxmem_probe(struct platform_device *pdev)
25 +#else
26 +static int acxmem_probe(struct platform_device *pdev)
27 +#endif
28 {
29 acx_device_t *adev = NULL;
30 const char *chip_name;
31 @@ -2392,7 +2396,11 @@ static int __devinit acxmem_probe(struct platform_device *pdev)
32 * pdev - ptr to PCI device structure containing info about pci
33 * configuration
34 */
35 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
36 static int __devexit acxmem_remove(struct platform_device *pdev)
37 +#else
38 +static int acxmem_remove(struct platform_device *pdev)
39 +#endif
40 {
41 struct ieee80211_hw *hw = (struct ieee80211_hw *)
42 platform_get_drvdata(pdev);
43 @@ -2594,8 +2602,11 @@ static struct platform_driver acxmem_driver = {
44 .name = "acx-mem",
45 },
46 .probe = acxmem_probe,
47 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
48 .remove = __devexit_p(acxmem_remove),
49 -
50 +#else
51 + .remove = acxmem_remove,
52 +#endif
53 #ifdef CONFIG_PM
54 .suspend = acxmem_e_suspend,
55 .resume = acxmem_e_resume
56 diff --git a/pci.c b/pci.c
57 index 1da31d1..ae07f5a 100644
58 --- a/pci.c
59 +++ b/pci.c
60 @@ -1039,7 +1039,11 @@ int acx100pci_ioctl_set_phy_amp_bias(struct net_device *ndev,
61 * id - ptr to the device id entry that matched this device
62 */
63 #ifdef CONFIG_PCI
64 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
65 static int __devinit acxpci_probe(struct pci_dev *pdev,
66 +#else
67 +static int acxpci_probe(struct pci_dev *pdev,
68 +#endif
69 const struct pci_device_id *id)
70 {
71 unsigned long mem_region1 = 0;
72 @@ -1292,7 +1296,11 @@ static int __devinit acxpci_probe(struct pci_dev *pdev,
73 *
74 * pdev - ptr to PCI device structure containing info about pci configuration
75 */
76 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
77 static void __devexit acxpci_remove(struct pci_dev *pdev)
78 +#else
79 +static void acxpci_remove(struct pci_dev *pdev)
80 +#endif
81 {
82 struct ieee80211_hw *hw
83 = (struct ieee80211_hw *) pci_get_drvdata(pdev);
84 @@ -1505,7 +1513,11 @@ static struct pci_driver acxpci_driver = {
85 .name = "acx_pci",
86 .id_table = acxpci_id_tbl,
87 .probe = acxpci_probe,
88 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
89 .remove = __devexit_p(acxpci_remove),
90 +#else
91 + .remove = acxpci_remove,
92 +#endif
93 #ifdef CONFIG_PM
94 .suspend = acxpci_e_suspend,
95 .resume = acxpci_e_resume
96 @@ -1603,8 +1615,12 @@ static struct vlynq_device_id acx_vlynq_id[] = {
97 };
98
99
100 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
101 static __devinit int vlynq_probe(struct vlynq_device *vdev,
102 - struct vlynq_device_id *id)
103 +#else
104 +static int vlynq_probe(struct vlynq_device *vdev,
105 +#endif
106 + struct vlynq_device_id *id)
107 {
108 int result = -EIO, i;
109 u32 addr;
110 @@ -1785,7 +1801,11 @@ static __devinit int vlynq_probe(struct vlynq_device *vdev,
111 return result;
112 }
113
114 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
115 static __devexit void vlynq_remove(struct vlynq_device *vdev)
116 +#else
117 +static void vlynq_remove(struct vlynq_device *vdev)
118 +#endif
119 {
120 struct ieee80211_hw *hw = vlynq_get_drvdata(vdev);
121 acx_device_t *adev = hw2adev(hw);
122 @@ -1851,7 +1871,11 @@ static struct vlynq_driver acxvlynq_driver = {
123 .name = "acx_vlynq",
124 .id_table = acx_vlynq_id,
125 .probe = vlynq_probe,
126 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
127 .remove = __devexit_p(vlynq_remove),
128 +#else
129 + .remove = vlynq_remove,
130 +#endif
131 };
132 #endif /* CONFIG_VLYNQ */
133
134 --
135 1.8.4.rc1
136