From: Lennert Buytenhek Date: Sun, 8 Jan 2006 09:01:09 +0000 (-0800) Subject: [PATCH] cs89x0: swap {read,write}reg and {read,write}word X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0d5affcfe23ade8c4c01154e7e381e2a9a916399;p=linux-beck.git [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 Cc: dmitry pervushin Cc: Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 04fca31f1733..221f92e45ec7 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c @@ -339,29 +339,29 @@ out: #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