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>
This commit is contained in:

committed by
David S. Miller

parent
dae2e9f430
commit
1ab0d2ec9a
@@ -113,7 +113,7 @@ static void desc_list_free(void)
|
||||
}
|
||||
}
|
||||
|
||||
static int desc_list_init(void)
|
||||
static int desc_list_init(struct net_device *dev)
|
||||
{
|
||||
int i;
|
||||
struct sk_buff *new_skb;
|
||||
@@ -187,7 +187,7 @@ static int desc_list_init(void)
|
||||
struct dma_descriptor *b = &(r->desc_b);
|
||||
|
||||
/* allocate a new skb for next time receive */
|
||||
new_skb = dev_alloc_skb(PKT_BUF_SZ + NET_IP_ALIGN);
|
||||
new_skb = netdev_alloc_skb(dev, PKT_BUF_SZ + NET_IP_ALIGN);
|
||||
if (!new_skb) {
|
||||
pr_notice("init: low on mem - packet dropped\n");
|
||||
goto init_error;
|
||||
@@ -1090,7 +1090,7 @@ static void bfin_mac_rx(struct net_device *dev)
|
||||
/* allocate a new skb for next time receive */
|
||||
skb = current_rx_ptr->skb;
|
||||
|
||||
new_skb = dev_alloc_skb(PKT_BUF_SZ + NET_IP_ALIGN);
|
||||
new_skb = netdev_alloc_skb(dev, PKT_BUF_SZ + NET_IP_ALIGN);
|
||||
if (!new_skb) {
|
||||
netdev_notice(dev, "rx: low on mem - packet dropped\n");
|
||||
dev->stats.rx_dropped++;
|
||||
@@ -1397,7 +1397,7 @@ static int bfin_mac_open(struct net_device *dev)
|
||||
}
|
||||
|
||||
/* initial rx and tx list */
|
||||
ret = desc_list_init();
|
||||
ret = desc_list_init(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
Reference in New Issue
Block a user