diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-10-29 14:41:03 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:17:35 -0500 |
commit | 743b97caf98036ec8ee4bfc6fc6f85ad94e04783 (patch) | |
tree | f972a7da6d83c163c37fb006089956b3319bf1dd /drivers/net/wireless/rt2x00/rt73usb.c | |
parent | f161796700ed89b07dff2ad4ba3a932bc721af7e (diff) |
rt2x00: Remove debugfs CSR access wrappers
Move calculation of CSR register offset into rt2x00debug.c
and remove the wrapper functions from each individual driver.
(Except rt2500usb, which still needs to wrap for the
different value type argument).
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 5be49ed4ecf9..767e3c98184c 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -249,43 +249,34 @@ rf_write: | |||
249 | } | 249 | } |
250 | 250 | ||
251 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS | 251 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS |
252 | #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) | ||
253 | |||
254 | static void rt73usb_read_csr(struct rt2x00_dev *rt2x00dev, | ||
255 | const unsigned int word, u32 *data) | ||
256 | { | ||
257 | rt73usb_register_read(rt2x00dev, CSR_OFFSET(word), data); | ||
258 | } | ||
259 | |||
260 | static void rt73usb_write_csr(struct rt2x00_dev *rt2x00dev, | ||
261 | const unsigned int word, u32 data) | ||
262 | { | ||
263 | rt73usb_register_write(rt2x00dev, CSR_OFFSET(word), data); | ||
264 | } | ||
265 | |||
266 | static const struct rt2x00debug rt73usb_rt2x00debug = { | 252 | static const struct rt2x00debug rt73usb_rt2x00debug = { |
267 | .owner = THIS_MODULE, | 253 | .owner = THIS_MODULE, |
268 | .csr = { | 254 | .csr = { |
269 | .read = rt73usb_read_csr, | 255 | .read = rt73usb_register_read, |
270 | .write = rt73usb_write_csr, | 256 | .write = rt73usb_register_write, |
257 | .flags = RT2X00DEBUGFS_OFFSET, | ||
258 | .word_base = CSR_REG_BASE, | ||
271 | .word_size = sizeof(u32), | 259 | .word_size = sizeof(u32), |
272 | .word_count = CSR_REG_SIZE / sizeof(u32), | 260 | .word_count = CSR_REG_SIZE / sizeof(u32), |
273 | }, | 261 | }, |
274 | .eeprom = { | 262 | .eeprom = { |
275 | .read = rt2x00_eeprom_read, | 263 | .read = rt2x00_eeprom_read, |
276 | .write = rt2x00_eeprom_write, | 264 | .write = rt2x00_eeprom_write, |
265 | .word_base = EEPROM_BASE, | ||
277 | .word_size = sizeof(u16), | 266 | .word_size = sizeof(u16), |
278 | .word_count = EEPROM_SIZE / sizeof(u16), | 267 | .word_count = EEPROM_SIZE / sizeof(u16), |
279 | }, | 268 | }, |
280 | .bbp = { | 269 | .bbp = { |
281 | .read = rt73usb_bbp_read, | 270 | .read = rt73usb_bbp_read, |
282 | .write = rt73usb_bbp_write, | 271 | .write = rt73usb_bbp_write, |
272 | .word_base = BBP_BASE, | ||
283 | .word_size = sizeof(u8), | 273 | .word_size = sizeof(u8), |
284 | .word_count = BBP_SIZE / sizeof(u8), | 274 | .word_count = BBP_SIZE / sizeof(u8), |
285 | }, | 275 | }, |
286 | .rf = { | 276 | .rf = { |
287 | .read = rt2x00_rf_read, | 277 | .read = rt2x00_rf_read, |
288 | .write = rt73usb_rf_write, | 278 | .write = rt73usb_rf_write, |
279 | .word_base = RF_BASE, | ||
289 | .word_size = sizeof(u32), | 280 | .word_size = sizeof(u32), |
290 | .word_count = RF_SIZE / sizeof(u32), | 281 | .word_count = RF_SIZE / sizeof(u32), |
291 | }, | 282 | }, |