diff options
-rw-r--r-- | drivers/net/cs89x0.c | 20 |
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 | ||
341 | static int | 341 | static int |
342 | readreg(struct net_device *dev, int portno) | 342 | readword(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 | ||
348 | static void | 347 | static void |
349 | writereg(struct net_device *dev, int portno, int value) | 348 | writeword(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 | ||
355 | static int | 353 | static int |
356 | readword(unsigned long base_addr, int portno) | 354 | readreg(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 | ||
361 | static void | 360 | static void |
362 | writeword(unsigned long base_addr, int portno, int value) | 361 | writereg(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 | ||
367 | static int __init | 367 | static int __init |