From 1ab0d2ec9aeb4489c05158e8a2b00bad89f67e03 Mon Sep 17 00:00:00 2001 From: "Pradeep A. Dalvi" Date: Mon, 6 Feb 2012 11:16:48 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/ethernet/apple/bmac.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'drivers/net/ethernet/apple') diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c index ebc0dba5ba33..855bdafb1a87 100644 --- a/drivers/net/ethernet/apple/bmac.c +++ b/drivers/net/ethernet/apple/bmac.c @@ -607,8 +607,9 @@ bmac_init_tx_ring(struct bmac_data *bp) } static int -bmac_init_rx_ring(struct bmac_data *bp) +bmac_init_rx_ring(struct net_device *dev) { + struct bmac_data *bp = netdev_priv(dev); volatile struct dbdma_regs __iomem *rd = bp->rx_dma; int i; struct sk_buff *skb; @@ -618,7 +619,7 @@ bmac_init_rx_ring(struct bmac_data *bp) (N_RX_RING + 1) * sizeof(struct dbdma_cmd)); for (i = 0; i < N_RX_RING; i++) { if ((skb = bp->rx_bufs[i]) == NULL) { - bp->rx_bufs[i] = skb = dev_alloc_skb(RX_BUFLEN+2); + bp->rx_bufs[i] = skb = netdev_alloc_skb(dev, RX_BUFLEN + 2); if (skb != NULL) skb_reserve(skb, 2); } @@ -722,7 +723,7 @@ static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id) ++dev->stats.rx_dropped; } if ((skb = bp->rx_bufs[i]) == NULL) { - bp->rx_bufs[i] = skb = dev_alloc_skb(RX_BUFLEN+2); + bp->rx_bufs[i] = skb = netdev_alloc_skb(dev, RX_BUFLEN + 2); if (skb != NULL) skb_reserve(bp->rx_bufs[i], 2); } @@ -1208,7 +1209,7 @@ static void bmac_reset_and_enable(struct net_device *dev) spin_lock_irqsave(&bp->lock, flags); bmac_enable_and_reset_chip(dev); bmac_init_tx_ring(bp); - bmac_init_rx_ring(bp); + bmac_init_rx_ring(dev); bmac_init_chip(dev); bmac_start_chip(dev); bmwrite(dev, INTDISABLE, EnableNormal); @@ -1218,7 +1219,7 @@ static void bmac_reset_and_enable(struct net_device *dev) * It seems that the bmac can't receive until it's transmitted * a packet. So we give it a dummy packet to transmit. */ - skb = dev_alloc_skb(ETHERMINPACKET); + skb = netdev_alloc_skb(dev, ETHERMINPACKET); if (skb != NULL) { data = skb_put(skb, ETHERMINPACKET); memset(data, 0, ETHERMINPACKET); -- cgit v1.2.2