Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18523
b: refs/heads/master
c: a07f0db
h: refs/heads/master
i:
  18521: 0fa1b70
  18519: 24f768b
v: v3
  • Loading branch information
Lennert Buytenhek authored and Linus Torvalds committed Jan 15, 2006
1 parent 6267170 commit 4b36bab
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 580d7b8cc59d68a3d26bfcc64c2053b464782c9a
refs/heads/master: a07f0dbec01fda6d88f5089e21454b8df53d36fc
38 changes: 19 additions & 19 deletions trunk/drivers/net/cs89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,38 +342,38 @@ struct net_device * __init cs89x0_probe(int unit)
#endif

#if defined(CONFIG_ARCH_IXDP2X01)
static int
static u16
readword(unsigned long base_addr, int portno)
{
return (u16)__raw_readl(base_addr + (portno << 1));
return __raw_readl(base_addr + (portno << 1));
}

static void
writeword(unsigned long base_addr, int portno, int value)
writeword(unsigned long base_addr, int portno, u16 value)
{
__raw_writel((u16)value, base_addr + (portno << 1));
__raw_writel(value, base_addr + (portno << 1));
}
#elif defined(CONFIG_ARCH_PNX010X)
static int
static u16
readword(unsigned long base_addr, int portno)
{
return inw(base_addr + (portno << 1));
}

static void
writeword(unsigned long base_addr, int portno, int value)
writeword(unsigned long base_addr, int portno, u16 value)
{
outw(value, base_addr + (portno << 1));
}
#else
static int
static u16
readword(unsigned long base_addr, int portno)
{
return inw(base_addr + portno);
}

static void
writeword(unsigned long base_addr, int portno, int value)
writeword(unsigned long base_addr, int portno, u16 value)
{
outw(value, base_addr + portno);
}
Expand All @@ -385,11 +385,11 @@ readwords(unsigned long base_addr, int portno, void *buf, int length)
u8 *buf8 = (u8 *)buf;

do {
u32 tmp32;
u16 tmp16;

tmp32 = readword(base_addr, portno);
*buf8++ = (u8)tmp32;
*buf8++ = (u8)(tmp32 >> 8);
tmp16 = readword(base_addr, portno);
*buf8++ = (u8)tmp16;
*buf8++ = (u8)(tmp16 >> 8);
} while (--length);
}

Expand All @@ -399,23 +399,23 @@ writewords(unsigned long base_addr, int portno, void *buf, int length)
u8 *buf8 = (u8 *)buf;

do {
u32 tmp32;
u16 tmp16;

tmp32 = *buf8++;
tmp32 |= (*buf8++) << 8;
writeword(base_addr, portno, tmp32);
tmp16 = *buf8++;
tmp16 |= (*buf8++) << 8;
writeword(base_addr, portno, tmp16);
} while (--length);
}

static int
readreg(struct net_device *dev, int regno)
static u16
readreg(struct net_device *dev, u16 regno)
{
writeword(dev->base_addr, ADD_PORT, regno);
return readword(dev->base_addr, DATA_PORT);
}

static void
writereg(struct net_device *dev, int regno, int value)
writereg(struct net_device *dev, u16 regno, u16 value)
{
writeword(dev->base_addr, ADD_PORT, regno);
writeword(dev->base_addr, DATA_PORT, value);
Expand Down

0 comments on commit 4b36bab

Please sign in to comment.