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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
From e6cbd7e05f7c1fe0a737526d20f39b4a52e03ae8 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Tue, 17 Mar 2009 14:01:29 +0100
Subject: [PATCH] rt2x00: Fix compile errors for SoC
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800pci.c | 37 +++++++++++++++----------------
1 files changed, 18 insertions(+), 19 deletions(-)
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -3186,7 +3186,7 @@ MODULE_LICENSE("GPL");
#define WSOC_RT_CHIPSET RT3052
#endif /* CONFIG_RALINK_RT305X */
-static void rt2800soc_free_reg(struct rt2x00_dev *rt2x00dev)
+static void rt2x00soc_free_reg(struct rt2x00_dev *rt2x00dev)
{
kfree(rt2x00dev->rf);
rt2x00dev->rf = NULL;
@@ -3195,7 +3195,7 @@ static void rt2800soc_free_reg(struct rt
rt2x00dev->eeprom = NULL;
}
-static int rt2800soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
+static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
{
struct platform_device *pdev = to_platform_device(rt2x00dev->dev);
struct resource *res;
@@ -3219,14 +3219,14 @@ static int rt2800soc_alloc_reg(struct rt
exit:
ERROR_PROBE("Failed to allocate registers.\n");
- rt2800soc_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
return -ENOMEM;
}
-static int rt2800soc_probe(struct platform_device *pdev)
+static int rt2x00soc_probe(struct platform_device *pdev)
{
- struct rt2x00_ops *ops = (struct rt2x00_ops *)pdev->driver->p;
+ const struct rt2x00_ops *ops = &rt2800pci_ops;
struct ieee80211_hw *hw;
struct rt2x00_dev *rt2x00dev;
int retval;
@@ -3248,7 +3248,7 @@ static int rt2800soc_probe(struct platfo
rt2x00_set_chip_rt(rt2x00dev, WSOC_RT_CHIPSET);
- retval = rt2800soc_alloc_reg(rt2x00dev);
+ retval = rt2x00soc_alloc_reg(rt2x00dev);
if (retval)
goto exit_free_device;
@@ -3259,7 +3259,7 @@ static int rt2800soc_probe(struct platfo
return 0;
exit_free_reg:
- rt2800soc_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
exit_free_device:
ieee80211_free_hw(hw);
@@ -3267,7 +3267,7 @@ exit_free_device:
return retval;
}
-static int rt2800soc_remove(struct platform_device *pdev)
+static int rt2x00soc_remove(struct platform_device *pdev)
{
struct ieee80211_hw *hw = platform_get_drvdata(pdev);
struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -3276,16 +3276,16 @@ static int rt2800soc_remove(struct platf
* Free all allocated data.
*/
rt2x00lib_remove_dev(rt2x00dev);
- rt2800soc_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
ieee80211_free_hw(hw);
return 0;
}
#ifdef CONFIG_PM
-int rt2x00soc_suspend(struct device *dev, pm_message_t state)
+int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state)
{
- struct ieee80211_hw *hw = dev_get_drvdata(dev);
+ struct ieee80211_hw *hw = platform_get_drvdata(pdev);
struct rt2x00_dev *rt2x00dev = hw->priv;
int retval;
@@ -3293,14 +3293,14 @@ int rt2x00soc_suspend(struct device *dev
if (retval)
return retval;
- rt2800soc_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
return 0;
}
-int rt2x00soc_resume(struct device *dev)
+int rt2x00soc_resume(struct platform_device *pdev)
{
- struct ieee80211_hw *hw = dev_get_drvdata(dev);
+ struct ieee80211_hw *hw = platform_get_drvdata(pdev);
struct rt2x00_dev *rt2x00dev = hw->priv;
int retval;
@@ -3315,7 +3315,7 @@ int rt2x00soc_resume(struct device *dev)
return 0;
exit_free_reg:
- rt2x00pci_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
return retval;
}
@@ -3326,10 +3326,9 @@ static struct platform_driver rt2800soc_
.name = "rt2800_wmac",
.owner = THIS_MODULE,
.mod_name = KBUILD_MODNAME,
- .p = &rt2800pci_ops;
- }
- .probe = rt2800soc_probe,
- .remove = __devexit_p(rt2800soc_remove),
+ },
+ .probe = rt2x00soc_probe,
+ .remove = __devexit_p(rt2x00soc_remove),
.suspend = rt2x00soc_suspend,
.resume = rt2x00soc_resume,
};
|