diff options
author | Pradeep A Dalvi <netdev@pradeepdalvi.com> | 2012-02-05 02:49:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-06 11:41:20 -0500 |
commit | 1d266430546acf01438ae42d0a7370db4817e2ad (patch) | |
tree | 149268ba8ad2b3288ae001e5ab28146e4361a6d0 /drivers/net/ethernet/amd/amd8111e.c | |
parent | 3238a9be4d7ad95c741bcfe6c147406eeef62d95 (diff) | |
download | linux-1d266430546acf01438ae42d0a7370db4817e2ad.tar.bz2 |
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/amd/amd8111e.c')
-rw-r--r-- | drivers/net/ethernet/amd/amd8111e.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c index b8306a589558..9f62504d0086 100644 --- a/drivers/net/ethernet/amd/amd8111e.c +++ b/drivers/net/ethernet/amd/amd8111e.c @@ -336,7 +336,8 @@ static int amd8111e_init_ring(struct net_device *dev) /* Allocating receive skbs */ for (i = 0; i < NUM_RX_BUFFERS; i++) { - if (!(lp->rx_skbuff[i] = dev_alloc_skb(lp->rx_buff_len))) { + lp->rx_skbuff[i] = netdev_alloc_skb(dev, lp->rx_buff_len); + if (!lp->rx_skbuff[i]) { /* Release previos allocated skbs */ for(--i; i >= 0 ;i--) dev_kfree_skb(lp->rx_skbuff[i]); @@ -768,7 +769,8 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget) } if(--rx_pkt_limit < 0) goto rx_not_empty; - if(!(new_skb = dev_alloc_skb(lp->rx_buff_len))){ + new_skb = netdev_alloc_skb(dev, lp->rx_buff_len); + if (!new_skb) { /* if allocation fail, ignore that pkt and go to next one */ lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; |