aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorBecky Bruce <bgill@freescale.com>2008-02-18 18:24:30 -0500
committerJeff Garzik <jeff@garzik.org>2008-02-23 23:57:48 -0500
commitcf7822983f21617b805712eec46eb31058508d6a (patch)
tree8c7aab7f74b60560339abb4700ec04a7ce795660 /drivers/net
parent563e0ae06ff18f0b280f11cf706ba0172255ce52 (diff)
gianfar: don't pass NULL dev ptr to DMA ops
Change all dma op invocations in gianfar.c to actually pass in the device pointer. Currently, the value is ignored, but it will be used going forward as we implement archdata for 32-bit powerpc. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/gianfar.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 4244fc282f21..718cf77e345a 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -605,7 +605,7 @@ void stop_gfar(struct net_device *dev)
605 605
606 free_skb_resources(priv); 606 free_skb_resources(priv);
607 607
608 dma_free_coherent(NULL, 608 dma_free_coherent(&dev->dev,
609 sizeof(struct txbd8)*priv->tx_ring_size 609 sizeof(struct txbd8)*priv->tx_ring_size
610 + sizeof(struct rxbd8)*priv->rx_ring_size, 610 + sizeof(struct rxbd8)*priv->rx_ring_size,
611 priv->tx_bd_base, 611 priv->tx_bd_base,
@@ -626,7 +626,7 @@ static void free_skb_resources(struct gfar_private *priv)
626 for (i = 0; i < priv->tx_ring_size; i++) { 626 for (i = 0; i < priv->tx_ring_size; i++) {
627 627
628 if (priv->tx_skbuff[i]) { 628 if (priv->tx_skbuff[i]) {
629 dma_unmap_single(NULL, txbdp->bufPtr, 629 dma_unmap_single(&priv->dev->dev, txbdp->bufPtr,
630 txbdp->length, 630 txbdp->length,
631 DMA_TO_DEVICE); 631 DMA_TO_DEVICE);
632 dev_kfree_skb_any(priv->tx_skbuff[i]); 632 dev_kfree_skb_any(priv->tx_skbuff[i]);
@@ -643,7 +643,7 @@ static void free_skb_resources(struct gfar_private *priv)
643 if(priv->rx_skbuff != NULL) { 643 if(priv->rx_skbuff != NULL) {
644 for (i = 0; i < priv->rx_ring_size; i++) { 644 for (i = 0; i < priv->rx_ring_size; i++) {
645 if (priv->rx_skbuff[i]) { 645 if (priv->rx_skbuff[i]) {
646 dma_unmap_single(NULL, rxbdp->bufPtr, 646 dma_unmap_single(&priv->dev->dev, rxbdp->bufPtr,
647 priv->rx_buffer_size, 647 priv->rx_buffer_size,
648 DMA_FROM_DEVICE); 648 DMA_FROM_DEVICE);
649 649
@@ -708,7 +708,7 @@ int startup_gfar(struct net_device *dev)
708 gfar_write(&regs->imask, IMASK_INIT_CLEAR); 708 gfar_write(&regs->imask, IMASK_INIT_CLEAR);
709 709
710 /* Allocate memory for the buffer descriptors */ 710 /* Allocate memory for the buffer descriptors */
711 vaddr = (unsigned long) dma_alloc_coherent(NULL, 711 vaddr = (unsigned long) dma_alloc_coherent(&dev->dev,
712 sizeof (struct txbd8) * priv->tx_ring_size + 712 sizeof (struct txbd8) * priv->tx_ring_size +
713 sizeof (struct rxbd8) * priv->rx_ring_size, 713 sizeof (struct rxbd8) * priv->rx_ring_size,
714 &addr, GFP_KERNEL); 714 &addr, GFP_KERNEL);
@@ -919,7 +919,7 @@ err_irq_fail:
919rx_skb_fail: 919rx_skb_fail:
920 free_skb_resources(priv); 920 free_skb_resources(priv);
921tx_skb_fail: 921tx_skb_fail:
922 dma_free_coherent(NULL, 922 dma_free_coherent(&dev->dev,
923 sizeof(struct txbd8)*priv->tx_ring_size 923 sizeof(struct txbd8)*priv->tx_ring_size
924 + sizeof(struct rxbd8)*priv->rx_ring_size, 924 + sizeof(struct rxbd8)*priv->rx_ring_size,
925 priv->tx_bd_base, 925 priv->tx_bd_base,
@@ -1053,7 +1053,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
1053 1053
1054 /* Set buffer length and pointer */ 1054 /* Set buffer length and pointer */
1055 txbdp->length = skb->len; 1055 txbdp->length = skb->len;
1056 txbdp->bufPtr = dma_map_single(NULL, skb->data, 1056 txbdp->bufPtr = dma_map_single(&dev->dev, skb->data,
1057 skb->len, DMA_TO_DEVICE); 1057 skb->len, DMA_TO_DEVICE);
1058 1058
1059 /* Save the skb pointer so we can free it later */ 1059 /* Save the skb pointer so we can free it later */
@@ -1332,7 +1332,7 @@ struct sk_buff * gfar_new_skb(struct net_device *dev, struct rxbd8 *bdp)
1332 */ 1332 */
1333 skb_reserve(skb, alignamount); 1333 skb_reserve(skb, alignamount);
1334 1334
1335 bdp->bufPtr = dma_map_single(NULL, skb->data, 1335 bdp->bufPtr = dma_map_single(&dev->dev, skb->data,
1336 priv->rx_buffer_size, DMA_FROM_DEVICE); 1336 priv->rx_buffer_size, DMA_FROM_DEVICE);
1337 1337
1338 bdp->length = 0; 1338 bdp->length = 0;