Convert to net_device_ops function tabl.e Signed-off-by: Stephen Hemminger --- a/drivers/net/veth.c 2008-11-17 10:27:34.000000000 -0800 +++ b/drivers/net/veth.c 2008-11-17 10:28:30.000000000 -0800 @@ -262,16 +262,20 @@ static void veth_dev_free(struct net_dev free_netdev(dev); } +static const struct net_device_ops veth_netdev_ops = { + .init = veth_dev_init, + .open = veth_open, + .get_stats = veth_get_stats, +}; + static void veth_setup(struct net_device *dev) { ether_setup(dev); + dev->netdev_ops = &veth_netdev_ops; dev->hard_start_xmit = veth_xmit; - dev->get_stats = veth_get_stats; - dev->open = veth_open; dev->ethtool_ops = &veth_ethtool_ops; dev->features |= NETIF_F_LLTX; - dev->init = veth_dev_init; dev->destructor = veth_dev_free; } @@ -297,7 +301,7 @@ static int veth_device_event(struct noti { struct net_device *dev = ptr; - if (dev->open != veth_open) + if (dev->netdev_ops->open != veth_open) goto out; switch (event) { -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html