aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cs89x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cs89x0.c')
-rw-r--r--drivers/net/cs89x0.c20
1 files changed, 10 insertions, 10 deletions
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:
339#endif 339#endif
340 340
341static int 341static int
342readreg(struct net_device *dev, int portno) 342readword(unsigned long base_addr, int portno)
343{ 343{
344 outw(portno, dev->base_addr + ADD_PORT); 344 return inw(base_addr + portno);
345 return inw(dev->base_addr + DATA_PORT);
346} 345}
347 346
348static void 347static void
349writereg(struct net_device *dev, int portno, int value) 348writeword(unsigned long base_addr, int portno, int value)
350{ 349{
351 outw(portno, dev->base_addr + ADD_PORT); 350 outw(value, base_addr + portno);
352 outw(value, dev->base_addr + DATA_PORT);
353} 351}
354 352
355static int 353static int
356readword(unsigned long base_addr, int portno) 354readreg(struct net_device *dev, int portno)
357{ 355{
358 return inw(base_addr + portno); 356 outw(portno, dev->base_addr + ADD_PORT);
357 return inw(dev->base_addr + DATA_PORT);
359} 358}
360 359
361static void 360static void
362writeword(unsigned long base_addr, int portno, int value) 361writereg(struct net_device *dev, int portno, int value)
363{ 362{
364 outw(value, base_addr + portno); 363 outw(portno, dev->base_addr + ADD_PORT);
364 outw(value, dev->base_addr + DATA_PORT);
365} 365}
366 366
367static int __init 367static int __init