forked from Minki/linux
[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>
This commit is contained in:
parent
fc8c7d79b1
commit
0d5affcfe2
@ -338,6 +338,18 @@ out:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static int
|
||||||
|
readword(unsigned long base_addr, int portno)
|
||||||
|
{
|
||||||
|
return inw(base_addr + portno);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
writeword(unsigned long base_addr, int portno, int value)
|
||||||
|
{
|
||||||
|
outw(value, base_addr + portno);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
readreg(struct net_device *dev, int portno)
|
readreg(struct net_device *dev, int portno)
|
||||||
{
|
{
|
||||||
@ -352,18 +364,6 @@ writereg(struct net_device *dev, int portno, int value)
|
|||||||
outw(value, dev->base_addr + DATA_PORT);
|
outw(value, dev->base_addr + DATA_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
readword(unsigned long base_addr, int portno)
|
|
||||||
{
|
|
||||||
return inw(base_addr + portno);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
writeword(unsigned long base_addr, int portno, int value)
|
|
||||||
{
|
|
||||||
outw(value, base_addr + portno);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __init
|
static int __init
|
||||||
wait_eeprom_ready(struct net_device *dev)
|
wait_eeprom_ready(struct net_device *dev)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user