aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-01-08 04:01:09 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:12:45 -0500
commit0d5affcfe23ade8c4c01154e7e381e2a9a916399 (patch)
treeba1e07c7e7ade464c79fa76681f5883136333608 /drivers
parentfc8c7d79b117f7a5b17640bf657d95afe4025bb8 (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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/cs89x0.c20
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
341static int 341static int
342readreg(struct net_device *dev, int portno) 342readword(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
348static void 347static void
349writereg(struct net_device *dev, int portno, int value) 348writeword(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
355static int 353static int
356readword(unsigned long base_addr, int portno) 354readreg(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
361static void 360static void
362writeword(unsigned long base_addr, int portno, int value) 361writereg(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
367static int __init 367static int __init