提交 0d5affcf 编写于 作者: L Lennert Buytenhek 提交者: 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: NLennert Buytenhek <buytenh@wantstofly.org>
Cc: dmitry pervushin <dpervushin@ru.mvista.com>
Cc: <dsaxena@plexity.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 fc8c7d79
...@@ -339,29 +339,29 @@ struct net_device * __init cs89x0_probe(int unit) ...@@ -339,29 +339,29 @@ struct net_device * __init cs89x0_probe(int unit)
#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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册