diff options
author | Adam Baker <linux@baker-net.org.uk> | 2007-10-27 07:41:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:02:59 -0500 |
commit | 0e14f6d3e088473b411d35ff63737e46efb9e6df (patch) | |
tree | e92eee3981e77b26aaf1662a607dea7d5738095f /drivers/net/wireless/rt2x00/rt2500usb.c | |
parent | d9890b8f45158970f3418d0c9c0b3bfde13d3a4f (diff) |
rt2x00: Unconstify rt2x00dev
Some register accesses need rt2x00dev to be non-const
they all need modifying so the prototype is consistent.
Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 4f8e388700c0..164548fd22b7 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -53,7 +53,7 @@ | |||
53 | * the access attempt is considered to have failed, | 53 | * the access attempt is considered to have failed, |
54 | * and we will print an error. | 54 | * and we will print an error. |
55 | */ | 55 | */ |
56 | static inline void rt2500usb_register_read(const struct rt2x00_dev *rt2x00dev, | 56 | static inline void rt2500usb_register_read(struct rt2x00_dev *rt2x00dev, |
57 | const unsigned int offset, | 57 | const unsigned int offset, |
58 | u16 *value) | 58 | u16 *value) |
59 | { | 59 | { |
@@ -64,8 +64,7 @@ static inline void rt2500usb_register_read(const struct rt2x00_dev *rt2x00dev, | |||
64 | *value = le16_to_cpu(reg); | 64 | *value = le16_to_cpu(reg); |
65 | } | 65 | } |
66 | 66 | ||
67 | static inline void rt2500usb_register_multiread(const struct rt2x00_dev | 67 | static inline void rt2500usb_register_multiread(struct rt2x00_dev *rt2x00dev, |
68 | *rt2x00dev, | ||
69 | const unsigned int offset, | 68 | const unsigned int offset, |
70 | void *value, const u16 length) | 69 | void *value, const u16 length) |
71 | { | 70 | { |
@@ -75,7 +74,7 @@ static inline void rt2500usb_register_multiread(const struct rt2x00_dev | |||
75 | value, length, timeout); | 74 | value, length, timeout); |
76 | } | 75 | } |
77 | 76 | ||
78 | static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev, | 77 | static inline void rt2500usb_register_write(struct rt2x00_dev *rt2x00dev, |
79 | const unsigned int offset, | 78 | const unsigned int offset, |
80 | u16 value) | 79 | u16 value) |
81 | { | 80 | { |
@@ -85,8 +84,7 @@ static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev, | |||
85 | ®, sizeof(u16), REGISTER_TIMEOUT); | 84 | ®, sizeof(u16), REGISTER_TIMEOUT); |
86 | } | 85 | } |
87 | 86 | ||
88 | static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev | 87 | static inline void rt2500usb_register_multiwrite(struct rt2x00_dev *rt2x00dev, |
89 | *rt2x00dev, | ||
90 | const unsigned int offset, | 88 | const unsigned int offset, |
91 | void *value, const u16 length) | 89 | void *value, const u16 length) |
92 | { | 90 | { |
@@ -96,7 +94,7 @@ static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev | |||
96 | value, length, timeout); | 94 | value, length, timeout); |
97 | } | 95 | } |
98 | 96 | ||
99 | static u16 rt2500usb_bbp_check(const struct rt2x00_dev *rt2x00dev) | 97 | static u16 rt2500usb_bbp_check(struct rt2x00_dev *rt2x00dev) |
100 | { | 98 | { |
101 | u16 reg; | 99 | u16 reg; |
102 | unsigned int i; | 100 | unsigned int i; |
@@ -111,7 +109,7 @@ static u16 rt2500usb_bbp_check(const struct rt2x00_dev *rt2x00dev) | |||
111 | return reg; | 109 | return reg; |
112 | } | 110 | } |
113 | 111 | ||
114 | static void rt2500usb_bbp_write(const struct rt2x00_dev *rt2x00dev, | 112 | static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev, |
115 | const unsigned int word, const u8 value) | 113 | const unsigned int word, const u8 value) |
116 | { | 114 | { |
117 | u16 reg; | 115 | u16 reg; |
@@ -136,7 +134,7 @@ static void rt2500usb_bbp_write(const struct rt2x00_dev *rt2x00dev, | |||
136 | rt2500usb_register_write(rt2x00dev, PHY_CSR7, reg); | 134 | rt2500usb_register_write(rt2x00dev, PHY_CSR7, reg); |
137 | } | 135 | } |
138 | 136 | ||
139 | static void rt2500usb_bbp_read(const struct rt2x00_dev *rt2x00dev, | 137 | static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev, |
140 | const unsigned int word, u8 *value) | 138 | const unsigned int word, u8 *value) |
141 | { | 139 | { |
142 | u16 reg; | 140 | u16 reg; |
@@ -173,7 +171,7 @@ static void rt2500usb_bbp_read(const struct rt2x00_dev *rt2x00dev, | |||
173 | *value = rt2x00_get_field16(reg, PHY_CSR7_DATA); | 171 | *value = rt2x00_get_field16(reg, PHY_CSR7_DATA); |
174 | } | 172 | } |
175 | 173 | ||
176 | static void rt2500usb_rf_write(const struct rt2x00_dev *rt2x00dev, | 174 | static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev, |
177 | const unsigned int word, const u32 value) | 175 | const unsigned int word, const u32 value) |
178 | { | 176 | { |
179 | u16 reg; | 177 | u16 reg; |
@@ -210,13 +208,13 @@ rf_write: | |||
210 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS | 208 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS |
211 | #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u16)) ) | 209 | #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u16)) ) |
212 | 210 | ||
213 | static void rt2500usb_read_csr(const struct rt2x00_dev *rt2x00dev, | 211 | static void rt2500usb_read_csr(struct rt2x00_dev *rt2x00dev, |
214 | const unsigned int word, u32 *data) | 212 | const unsigned int word, u32 *data) |
215 | { | 213 | { |
216 | rt2500usb_register_read(rt2x00dev, CSR_OFFSET(word), (u16 *) data); | 214 | rt2500usb_register_read(rt2x00dev, CSR_OFFSET(word), (u16 *) data); |
217 | } | 215 | } |
218 | 216 | ||
219 | static void rt2500usb_write_csr(const struct rt2x00_dev *rt2x00dev, | 217 | static void rt2500usb_write_csr(struct rt2x00_dev *rt2x00dev, |
220 | const unsigned int word, u32 data) | 218 | const unsigned int word, u32 data) |
221 | { | 219 | { |
222 | rt2500usb_register_write(rt2x00dev, CSR_OFFSET(word), data); | 220 | rt2500usb_register_write(rt2x00dev, CSR_OFFSET(word), data); |