diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2006-01-08 04:01:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:12:45 -0500 |
commit | 0d5affcfe23ade8c4c01154e7e381e2a9a916399 (patch) | |
tree | ba1e07c7e7ade464c79fa76681f5883136333608 | |
parent | fc8c7d79b117f7a5b17640bf657d95afe4025bb8 (diff) |
[PATCH] cs89x0: swap {read,write}reg and {read,write}word
Reverse the order of readreg/writereg and readword/writeword in the
file, so that we can make readreg/writereg use readword/writeword.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/net/cs89x0.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 04fca31f1733..221f92e45ec7 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -339,29 +339,29 @@ out: | |||
339 | #endif | 339 | #endif |
340 | 340 | ||
341 | static int | 341 | static int |
342 | readreg(struct net_device *dev, int portno) | 342 | readword(unsigned long base_addr, int portno) |
343 | { | 343 | { |
344 | outw(portno, dev->base_addr + ADD_PORT); | 344 | return inw(base_addr + portno); |
345 | return inw(dev->base_addr + DATA_PORT); | ||
346 | } | 345 | } |
347 | 346 | ||
348 | static void | 347 | static void |
349 | writereg(struct net_device *dev, int portno, int value) | 348 | writeword(unsigned long base_addr, int portno, int value) |
350 | { | 349 | { |
351 | outw(portno, dev->base_addr + ADD_PORT); | 350 | outw(value, base_addr + portno); |
352 | outw(value, dev->base_addr + DATA_PORT); | ||
353 | } | 351 | } |
354 | 352 | ||
355 | static int | 353 | static int |
356 | readword(unsigned long base_addr, int portno) | 354 | readreg(struct net_device *dev, int portno) |
357 | { | 355 | { |
358 | return inw(base_addr + portno); | 356 | outw(portno, dev->base_addr + ADD_PORT); |
357 | return inw(dev->base_addr + DATA_PORT); | ||
359 | } | 358 | } |
360 | 359 | ||
361 | static void | 360 | static void |
362 | writeword(unsigned long base_addr, int portno, int value) | 361 | writereg(struct net_device *dev, int portno, int value) |
363 | { | 362 | { |
364 | outw(value, base_addr + portno); | 363 | outw(portno, dev->base_addr + ADD_PORT); |
364 | outw(value, dev->base_addr + DATA_PORT); | ||
365 | } | 365 | } |
366 | 366 | ||
367 | static int __init | 367 | static int __init |