Skip to content

Commit

Permalink
bfin_mac: fix build error due to net_device_ops convert
Browse files Browse the repository at this point in the history
The previous commit "convert to net_device_ops" broke the Blackfin MAC
driver as it declared the new structure before the function it used:
  CC      drivers/net/bfin_mac.o
drivers/net/bfin_mac.c:984: error: ‘bfin_mac_close’ undeclared here (not in a function)
make[1]: *** [drivers/net/bfin_mac.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mike Frysinger authored and David S. Miller committed May 27, 2009
1 parent 5ad1890 commit b63dc8f
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,22 +979,7 @@ static int bfin_mac_open(struct net_device *dev)
return 0;
}

static const struct net_device_ops bfin_mac_netdev_ops = {
.ndo_open = bfin_mac_open,
.ndo_stop = bfin_mac_close,
.ndo_start_xmit = bfin_mac_hard_start_xmit,
.ndo_set_mac_address = bfin_mac_set_mac_address,
.ndo_tx_timeout = bfin_mac_timeout,
.ndo_set_multicast_list = bfin_mac_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = bfin_mac_poll,
#endif
};

/*
*
* this makes the board clean up everything that it can
* and not talk to the outside world. Caused by
* an 'ifconfig ethX down'
Expand All @@ -1019,6 +1004,20 @@ static int bfin_mac_close(struct net_device *dev)
return 0;
}

static const struct net_device_ops bfin_mac_netdev_ops = {
.ndo_open = bfin_mac_open,
.ndo_stop = bfin_mac_close,
.ndo_start_xmit = bfin_mac_hard_start_xmit,
.ndo_set_mac_address = bfin_mac_set_mac_address,
.ndo_tx_timeout = bfin_mac_timeout,
.ndo_set_multicast_list = bfin_mac_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = bfin_mac_poll,
#endif
};

static int __devinit bfin_mac_probe(struct platform_device *pdev)
{
struct net_device *ndev;
Expand Down

0 comments on commit b63dc8f

Please sign in to comment.