diff options
author | Mikael Pettersson <mikpe@it.uu.se> | 2008-08-13 15:08:14 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-14 04:27:00 -0400 |
commit | 7144decb0f482fcb2152c10c376f0574d563ca52 (patch) | |
tree | f02ec3fabd01c6e34f99998e52ed97857f455d00 /drivers/net/arm | |
parent | 2a54adc3ad771c997bfa721f098d2d4a6ef6ea38 (diff) |
ixp4xx_eth: fix dma_mapping_error() compile errors
The arm ixp4xx_eth driver doesn't compile in 2.6.27-rc1:
CC [M] drivers/net/arm/ixp4xx_eth.o
drivers/net/arm/ixp4xx_eth.c: In function 'eth_poll':
drivers/net/arm/ixp4xx_eth.c:554: warning: passing argument 1 of 'dma_mapping_error' makes pointer from integer without a cast
drivers/net/arm/ixp4xx_eth.c:554: error: too few arguments to function 'dma_mapping_error'
drivers/net/arm/ixp4xx_eth.c: In function 'eth_xmit':
drivers/net/arm/ixp4xx_eth.c:701: warning: passing argument 1 of 'dma_mapping_error' makes pointer from integer without a cast
drivers/net/arm/ixp4xx_eth.c:701: error: too few arguments to function 'dma_mapping_error'
drivers/net/arm/ixp4xx_eth.c: In function 'init_queues':
drivers/net/arm/ixp4xx_eth.c:886: warning: passing argument 1 of 'dma_mapping_error' makes pointer from integer without a cast
drivers/net/arm/ixp4xx_eth.c:886: error: too few arguments to function 'dma_mapping_error'
make[3]: *** [drivers/net/arm/ixp4xx_eth.o] Error 1
make[2]: *** [drivers/net/arm] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
dma_mapping_error() changed in 2.6.27-rc1 to also take a device parameter,
but nobody bothered updating ixp4xx_eth.c. Fixed by passing the appropriate
device value in the dma_mapping_error() calls.
Tested on an ixp425 box.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/arm')
-rw-r--r-- | drivers/net/arm/ixp4xx_eth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 9b777d9433c..7d5db2ece1b 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -551,7 +551,7 @@ static int eth_poll(struct napi_struct *napi, int budget) | |||
551 | if ((skb = netdev_alloc_skb(dev, RX_BUFF_SIZE))) { | 551 | if ((skb = netdev_alloc_skb(dev, RX_BUFF_SIZE))) { |
552 | phys = dma_map_single(&dev->dev, skb->data, | 552 | phys = dma_map_single(&dev->dev, skb->data, |
553 | RX_BUFF_SIZE, DMA_FROM_DEVICE); | 553 | RX_BUFF_SIZE, DMA_FROM_DEVICE); |
554 | if (dma_mapping_error(phys)) { | 554 | if (dma_mapping_error(&dev->dev, phys)) { |
555 | dev_kfree_skb(skb); | 555 | dev_kfree_skb(skb); |
556 | skb = NULL; | 556 | skb = NULL; |
557 | } | 557 | } |
@@ -698,7 +698,7 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
698 | #endif | 698 | #endif |
699 | 699 | ||
700 | phys = dma_map_single(&dev->dev, mem, bytes, DMA_TO_DEVICE); | 700 | phys = dma_map_single(&dev->dev, mem, bytes, DMA_TO_DEVICE); |
701 | if (dma_mapping_error(phys)) { | 701 | if (dma_mapping_error(&dev->dev, phys)) { |
702 | #ifdef __ARMEB__ | 702 | #ifdef __ARMEB__ |
703 | dev_kfree_skb(skb); | 703 | dev_kfree_skb(skb); |
704 | #else | 704 | #else |
@@ -883,7 +883,7 @@ static int init_queues(struct port *port) | |||
883 | desc->buf_len = MAX_MRU; | 883 | desc->buf_len = MAX_MRU; |
884 | desc->data = dma_map_single(&port->netdev->dev, data, | 884 | desc->data = dma_map_single(&port->netdev->dev, data, |
885 | RX_BUFF_SIZE, DMA_FROM_DEVICE); | 885 | RX_BUFF_SIZE, DMA_FROM_DEVICE); |
886 | if (dma_mapping_error(desc->data)) { | 886 | if (dma_mapping_error(&port->netdev->dev, desc->data)) { |
887 | free_buffer(buff); | 887 | free_buffer(buff); |
888 | return -EIO; | 888 | return -EIO; |
889 | } | 889 | } |