[PATCH] cs89x0: make {read,write}reg use {read,write}word
authorLennert Buytenhek <buytenh@wantstofly.org>
Sun, 8 Jan 2006 09:01:10 +0000 (01:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:12:45 +0000 (20:12 -0800)
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>
drivers/net/cs89x0.c

index 221f92e45ec73f797379209afccbb3ace3a1c255..756d80adc47bd36fac53a2f392c96025079f540c 100644 (file)
@@ -351,17 +351,17 @@ writeword(unsigned long base_addr, int portno, int value)
 }
 
 static int
-readreg(struct net_device *dev, int portno)
+readreg(struct net_device *dev, int regno)
 {
-       outw(portno, dev->base_addr + ADD_PORT);
-       return inw(dev->base_addr + DATA_PORT);
+       writeword(dev->base_addr, ADD_PORT, regno);
+       return readword(dev->base_addr, DATA_PORT);
 }
 
 static void
-writereg(struct net_device *dev, int portno, int value)
+writereg(struct net_device *dev, int regno, int value)
 {
-       outw(portno, dev->base_addr + ADD_PORT);
-       outw(value, dev->base_addr + DATA_PORT);
+       writeword(dev->base_addr, ADD_PORT, regno);
+       writeword(dev->base_addr, DATA_PORT, value);
 }
 
 static int __init