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/rt73usb.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/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index b9d5310c386f..6b6649624470 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.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 rt73usb_register_read(const struct rt2x00_dev *rt2x00dev, | 56 | static inline void rt73usb_register_read(struct rt2x00_dev *rt2x00dev, |
57 | const unsigned int offset, u32 *value) | 57 | const unsigned int offset, u32 *value) |
58 | { | 58 | { |
59 | __le32 reg; | 59 | __le32 reg; |
@@ -63,8 +63,7 @@ static inline void rt73usb_register_read(const struct rt2x00_dev *rt2x00dev, | |||
63 | *value = le32_to_cpu(reg); | 63 | *value = le32_to_cpu(reg); |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline void rt73usb_register_multiread(const struct rt2x00_dev | 66 | static inline void rt73usb_register_multiread(struct rt2x00_dev *rt2x00dev, |
67 | *rt2x00dev, | ||
68 | const unsigned int offset, | 67 | const unsigned int offset, |
69 | void *value, const u32 length) | 68 | void *value, const u32 length) |
70 | { | 69 | { |
@@ -74,7 +73,7 @@ static inline void rt73usb_register_multiread(const struct rt2x00_dev | |||
74 | value, length, timeout); | 73 | value, length, timeout); |
75 | } | 74 | } |
76 | 75 | ||
77 | static inline void rt73usb_register_write(const struct rt2x00_dev *rt2x00dev, | 76 | static inline void rt73usb_register_write(struct rt2x00_dev *rt2x00dev, |
78 | const unsigned int offset, u32 value) | 77 | const unsigned int offset, u32 value) |
79 | { | 78 | { |
80 | __le32 reg = cpu_to_le32(value); | 79 | __le32 reg = cpu_to_le32(value); |
@@ -83,8 +82,7 @@ static inline void rt73usb_register_write(const struct rt2x00_dev *rt2x00dev, | |||
83 | ®, sizeof(u32), REGISTER_TIMEOUT); | 82 | ®, sizeof(u32), REGISTER_TIMEOUT); |
84 | } | 83 | } |
85 | 84 | ||
86 | static inline void rt73usb_register_multiwrite(const struct rt2x00_dev | 85 | static inline void rt73usb_register_multiwrite(struct rt2x00_dev *rt2x00dev, |
87 | *rt2x00dev, | ||
88 | const unsigned int offset, | 86 | const unsigned int offset, |
89 | void *value, const u32 length) | 87 | void *value, const u32 length) |
90 | { | 88 | { |
@@ -94,7 +92,7 @@ static inline void rt73usb_register_multiwrite(const struct rt2x00_dev | |||
94 | value, length, timeout); | 92 | value, length, timeout); |
95 | } | 93 | } |
96 | 94 | ||
97 | static u32 rt73usb_bbp_check(const struct rt2x00_dev *rt2x00dev) | 95 | static u32 rt73usb_bbp_check(struct rt2x00_dev *rt2x00dev) |
98 | { | 96 | { |
99 | u32 reg; | 97 | u32 reg; |
100 | unsigned int i; | 98 | unsigned int i; |
@@ -109,7 +107,7 @@ static u32 rt73usb_bbp_check(const struct rt2x00_dev *rt2x00dev) | |||
109 | return reg; | 107 | return reg; |
110 | } | 108 | } |
111 | 109 | ||
112 | static void rt73usb_bbp_write(const struct rt2x00_dev *rt2x00dev, | 110 | static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev, |
113 | const unsigned int word, const u8 value) | 111 | const unsigned int word, const u8 value) |
114 | { | 112 | { |
115 | u32 reg; | 113 | u32 reg; |
@@ -135,7 +133,7 @@ static void rt73usb_bbp_write(const struct rt2x00_dev *rt2x00dev, | |||
135 | rt73usb_register_write(rt2x00dev, PHY_CSR3, reg); | 133 | rt73usb_register_write(rt2x00dev, PHY_CSR3, reg); |
136 | } | 134 | } |
137 | 135 | ||
138 | static void rt73usb_bbp_read(const struct rt2x00_dev *rt2x00dev, | 136 | static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev, |
139 | const unsigned int word, u8 *value) | 137 | const unsigned int word, u8 *value) |
140 | { | 138 | { |
141 | u32 reg; | 139 | u32 reg; |
@@ -172,7 +170,7 @@ static void rt73usb_bbp_read(const struct rt2x00_dev *rt2x00dev, | |||
172 | *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE); | 170 | *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE); |
173 | } | 171 | } |
174 | 172 | ||
175 | static void rt73usb_rf_write(const struct rt2x00_dev *rt2x00dev, | 173 | static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev, |
176 | const unsigned int word, const u32 value) | 174 | const unsigned int word, const u32 value) |
177 | { | 175 | { |
178 | u32 reg; | 176 | u32 reg; |
@@ -212,13 +210,13 @@ rf_write: | |||
212 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS | 210 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS |
213 | #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) | 211 | #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) |
214 | 212 | ||
215 | static void rt73usb_read_csr(const struct rt2x00_dev *rt2x00dev, | 213 | static void rt73usb_read_csr(struct rt2x00_dev *rt2x00dev, |
216 | const unsigned int word, u32 *data) | 214 | const unsigned int word, u32 *data) |
217 | { | 215 | { |
218 | rt73usb_register_read(rt2x00dev, CSR_OFFSET(word), data); | 216 | rt73usb_register_read(rt2x00dev, CSR_OFFSET(word), data); |
219 | } | 217 | } |
220 | 218 | ||
221 | static void rt73usb_write_csr(const struct rt2x00_dev *rt2x00dev, | 219 | static void rt73usb_write_csr(struct rt2x00_dev *rt2x00dev, |
222 | const unsigned int word, u32 data) | 220 | const unsigned int word, u32 data) |
223 | { | 221 | { |
224 | rt73usb_register_write(rt2x00dev, CSR_OFFSET(word), data); | 222 | rt73usb_register_write(rt2x00dev, CSR_OFFSET(word), data); |