diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/cs89x0.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index a7ef8a66ba0f..2687b3e0994d 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -342,38 +342,38 @@ out: | |||
342 | #endif | 342 | #endif |
343 | 343 | ||
344 | #if defined(CONFIG_ARCH_IXDP2X01) | 344 | #if defined(CONFIG_ARCH_IXDP2X01) |
345 | static int | 345 | static u16 |
346 | readword(unsigned long base_addr, int portno) | 346 | readword(unsigned long base_addr, int portno) |
347 | { | 347 | { |
348 | return (u16)__raw_readl(base_addr + (portno << 1)); | 348 | return __raw_readl(base_addr + (portno << 1)); |
349 | } | 349 | } |
350 | 350 | ||
351 | static void | 351 | static void |
352 | writeword(unsigned long base_addr, int portno, int value) | 352 | writeword(unsigned long base_addr, int portno, u16 value) |
353 | { | 353 | { |
354 | __raw_writel((u16)value, base_addr + (portno << 1)); | 354 | __raw_writel(value, base_addr + (portno << 1)); |
355 | } | 355 | } |
356 | #elif defined(CONFIG_ARCH_PNX010X) | 356 | #elif defined(CONFIG_ARCH_PNX010X) |
357 | static int | 357 | static u16 |
358 | readword(unsigned long base_addr, int portno) | 358 | readword(unsigned long base_addr, int portno) |
359 | { | 359 | { |
360 | return inw(base_addr + (portno << 1)); | 360 | return inw(base_addr + (portno << 1)); |
361 | } | 361 | } |
362 | 362 | ||
363 | static void | 363 | static void |
364 | writeword(unsigned long base_addr, int portno, int value) | 364 | writeword(unsigned long base_addr, int portno, u16 value) |
365 | { | 365 | { |
366 | outw(value, base_addr + (portno << 1)); | 366 | outw(value, base_addr + (portno << 1)); |
367 | } | 367 | } |
368 | #else | 368 | #else |
369 | static int | 369 | static u16 |
370 | readword(unsigned long base_addr, int portno) | 370 | readword(unsigned long base_addr, int portno) |
371 | { | 371 | { |
372 | return inw(base_addr + portno); | 372 | return inw(base_addr + portno); |
373 | } | 373 | } |
374 | 374 | ||
375 | static void | 375 | static void |
376 | writeword(unsigned long base_addr, int portno, int value) | 376 | writeword(unsigned long base_addr, int portno, u16 value) |
377 | { | 377 | { |
378 | outw(value, base_addr + portno); | 378 | outw(value, base_addr + portno); |
379 | } | 379 | } |
@@ -385,11 +385,11 @@ readwords(unsigned long base_addr, int portno, void *buf, int length) | |||
385 | u8 *buf8 = (u8 *)buf; | 385 | u8 *buf8 = (u8 *)buf; |
386 | 386 | ||
387 | do { | 387 | do { |
388 | u32 tmp32; | 388 | u16 tmp16; |
389 | 389 | ||
390 | tmp32 = readword(base_addr, portno); | 390 | tmp16 = readword(base_addr, portno); |
391 | *buf8++ = (u8)tmp32; | 391 | *buf8++ = (u8)tmp16; |
392 | *buf8++ = (u8)(tmp32 >> 8); | 392 | *buf8++ = (u8)(tmp16 >> 8); |
393 | } while (--length); | 393 | } while (--length); |
394 | } | 394 | } |
395 | 395 | ||
@@ -399,23 +399,23 @@ writewords(unsigned long base_addr, int portno, void *buf, int length) | |||
399 | u8 *buf8 = (u8 *)buf; | 399 | u8 *buf8 = (u8 *)buf; |
400 | 400 | ||
401 | do { | 401 | do { |
402 | u32 tmp32; | 402 | u16 tmp16; |
403 | 403 | ||
404 | tmp32 = *buf8++; | 404 | tmp16 = *buf8++; |
405 | tmp32 |= (*buf8++) << 8; | 405 | tmp16 |= (*buf8++) << 8; |
406 | writeword(base_addr, portno, tmp32); | 406 | writeword(base_addr, portno, tmp16); |
407 | } while (--length); | 407 | } while (--length); |
408 | } | 408 | } |
409 | 409 | ||
410 | static int | 410 | static u16 |
411 | readreg(struct net_device *dev, int regno) | 411 | readreg(struct net_device *dev, u16 regno) |
412 | { | 412 | { |
413 | writeword(dev->base_addr, ADD_PORT, regno); | 413 | writeword(dev->base_addr, ADD_PORT, regno); |
414 | return readword(dev->base_addr, DATA_PORT); | 414 | return readword(dev->base_addr, DATA_PORT); |
415 | } | 415 | } |
416 | 416 | ||
417 | static void | 417 | static void |
418 | writereg(struct net_device *dev, int regno, int value) | 418 | writereg(struct net_device *dev, u16 regno, u16 value) |
419 | { | 419 | { |
420 | writeword(dev->base_addr, ADD_PORT, regno); | 420 | writeword(dev->base_addr, ADD_PORT, regno); |
421 | writeword(dev->base_addr, DATA_PORT, value); | 421 | writeword(dev->base_addr, DATA_PORT, value); |