diff options
author | Pradeep A. Dalvi <netdev@pradeepdalvi.com> | 2012-02-06 06:16:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-08 18:46:38 -0500 |
commit | dae2e9f430c46c29e3f771110094bd3da3625aa4 (patch) | |
tree | b78b2671d2566ea5795349e5dadf8ef786b507f5 /drivers/net/ethernet/renesas/sh_eth.c | |
parent | c4062dfc425e94290ac427a98d6b4721dd2bc91f (diff) |
netdev: ethernet dev_alloc_skb to netdev_alloc_skb
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
- Removed extra skb->dev = dev after netdev_alloc_skb
Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/sh_eth.c')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index dacd13150b6c..1a69504ed9c5 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
@@ -653,13 +653,12 @@ static void sh_eth_ring_format(struct net_device *ndev) | |||
653 | for (i = 0; i < RX_RING_SIZE; i++) { | 653 | for (i = 0; i < RX_RING_SIZE; i++) { |
654 | /* skb */ | 654 | /* skb */ |
655 | mdp->rx_skbuff[i] = NULL; | 655 | mdp->rx_skbuff[i] = NULL; |
656 | skb = dev_alloc_skb(mdp->rx_buf_sz); | 656 | skb = netdev_alloc_skb(ndev, mdp->rx_buf_sz); |
657 | mdp->rx_skbuff[i] = skb; | 657 | mdp->rx_skbuff[i] = skb; |
658 | if (skb == NULL) | 658 | if (skb == NULL) |
659 | break; | 659 | break; |
660 | dma_map_single(&ndev->dev, skb->data, mdp->rx_buf_sz, | 660 | dma_map_single(&ndev->dev, skb->data, mdp->rx_buf_sz, |
661 | DMA_FROM_DEVICE); | 661 | DMA_FROM_DEVICE); |
662 | skb->dev = ndev; /* Mark as being used by this device. */ | ||
663 | sh_eth_set_receive_align(skb); | 662 | sh_eth_set_receive_align(skb); |
664 | 663 | ||
665 | /* RX descriptor */ | 664 | /* RX descriptor */ |
@@ -953,13 +952,12 @@ static int sh_eth_rx(struct net_device *ndev) | |||
953 | rxdesc->buffer_length = ALIGN(mdp->rx_buf_sz, 16); | 952 | rxdesc->buffer_length = ALIGN(mdp->rx_buf_sz, 16); |
954 | 953 | ||
955 | if (mdp->rx_skbuff[entry] == NULL) { | 954 | if (mdp->rx_skbuff[entry] == NULL) { |
956 | skb = dev_alloc_skb(mdp->rx_buf_sz); | 955 | skb = netdev_alloc_skb(ndev, mdp->rx_buf_sz); |
957 | mdp->rx_skbuff[entry] = skb; | 956 | mdp->rx_skbuff[entry] = skb; |
958 | if (skb == NULL) | 957 | if (skb == NULL) |
959 | break; /* Better luck next round. */ | 958 | break; /* Better luck next round. */ |
960 | dma_map_single(&ndev->dev, skb->data, mdp->rx_buf_sz, | 959 | dma_map_single(&ndev->dev, skb->data, mdp->rx_buf_sz, |
961 | DMA_FROM_DEVICE); | 960 | DMA_FROM_DEVICE); |
962 | skb->dev = ndev; | ||
963 | sh_eth_set_receive_align(skb); | 961 | sh_eth_set_receive_align(skb); |
964 | 962 | ||
965 | skb_checksum_none_assert(skb); | 963 | skb_checksum_none_assert(skb); |