Skip to content

Commit

Permalink
[PATCH] cs89x0: swap {read,write}reg and {read,write}word
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lennert Buytenhek authored and Linus Torvalds committed Jan 9, 2006
1 parent fc8c7d7 commit 0d5affc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/net/cs89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,29 +339,29 @@ struct net_device * __init cs89x0_probe(int unit)
#endif

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(dev->base_addr + DATA_PORT);
return inw(base_addr + portno);
}

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, dev->base_addr + DATA_PORT);
outw(value, base_addr + portno);
}

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
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
Expand Down

0 comments on commit 0d5affc

Please sign in to comment.