Commit 0d5affcf authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Linus Torvalds

[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: default avatarLennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fc8c7d79
...@@ -339,29 +339,29 @@ out: ...@@ -339,29 +339,29 @@ out:
#endif #endif
static int static int
readreg(struct net_device *dev, int portno) readword(unsigned long base_addr, int portno)
{ {
outw(portno, dev->base_addr + ADD_PORT); return inw(base_addr + portno);
return inw(dev->base_addr + DATA_PORT);
} }
static void static void
writereg(struct net_device *dev, int portno, int value) writeword(unsigned long base_addr, int portno, int value)
{ {
outw(portno, dev->base_addr + ADD_PORT); outw(value, base_addr + portno);
outw(value, dev->base_addr + DATA_PORT);
} }
static int static int
readword(unsigned long base_addr, int portno) readreg(struct net_device *dev, int portno)
{ {
return inw(base_addr + portno); outw(portno, dev->base_addr + ADD_PORT);
return inw(dev->base_addr + DATA_PORT);
} }
static void static void
writeword(unsigned long base_addr, int portno, int value) writereg(struct net_device *dev, int portno, int value)
{ {
outw(value, base_addr + portno); outw(portno, dev->base_addr + ADD_PORT);
outw(value, dev->base_addr + DATA_PORT);
} }
static int __init static int __init
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment