Commit b72061a3 authored by Fabio Estevam's avatar Fabio Estevam Committed by David S. Miller

net: fec: Fix build due to wrong dev annotation

commit 21a4e469 (netdev: ethernet dev_alloc_skb to netdev_alloc_skb)
should have used "ndev" instead of "dev".

This causes the following build errors:

drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_rx':
drivers/net/ethernet/freescale/fec.c:714: error: 'dev' undeclared (first use in this function)
drivers/net/ethernet/freescale/fec.c:714: error: (Each undeclared identifier is reported only once
drivers/net/ethernet/freescale/fec.c:714: error: for each function it appears in.)
drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_alloc_buffers':
drivers/net/ethernet/freescale/fec.c:1213: error: 'dev' undeclared (first use in this function)

Fix it, so that fec driver can be built again.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3059be1
...@@ -711,7 +711,7 @@ fec_enet_rx(struct net_device *ndev) ...@@ -711,7 +711,7 @@ fec_enet_rx(struct net_device *ndev)
* include that when passing upstream as it messes up * include that when passing upstream as it messes up
* bridging applications. * bridging applications.
*/ */
skb = netdev_alloc_skb(dev, pkt_len - 4 + NET_IP_ALIGN); skb = netdev_alloc_skb(ndev, pkt_len - 4 + NET_IP_ALIGN);
if (unlikely(!skb)) { if (unlikely(!skb)) {
printk("%s: Memory squeeze, dropping packet.\n", printk("%s: Memory squeeze, dropping packet.\n",
...@@ -1210,7 +1210,7 @@ static int fec_enet_alloc_buffers(struct net_device *ndev) ...@@ -1210,7 +1210,7 @@ static int fec_enet_alloc_buffers(struct net_device *ndev)
bdp = fep->rx_bd_base; bdp = fep->rx_bd_base;
for (i = 0; i < RX_RING_SIZE; i++) { for (i = 0; i < RX_RING_SIZE; i++) {
skb = netdev_alloc_skb(dev, FEC_ENET_RX_FRSIZE); skb = netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE);
if (!skb) { if (!skb) {
fec_enet_free_buffers(ndev); fec_enet_free_buffers(ndev);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment