Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ether1: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexander Beregalov and committed by
David S. Miller
0b179e31 9aa7b30c

+13 -6
+13 -6
drivers/net/arm/ether1.c
··· 991 991 printk(KERN_INFO "%s", version); 992 992 } 993 993 994 + static const struct net_device_ops ether1_netdev_ops = { 995 + .ndo_open = ether1_open, 996 + .ndo_stop = ether1_close, 997 + .ndo_start_xmit = ether1_sendpacket, 998 + .ndo_get_stats = ether1_getstats, 999 + .ndo_set_multicast_list = ether1_setmulticastlist, 1000 + .ndo_tx_timeout = ether1_timeout, 1001 + .ndo_validate_addr = eth_validate_addr, 1002 + .ndo_change_mtu = eth_change_mtu, 1003 + .ndo_set_mac_address = eth_mac_addr, 1004 + }; 1005 + 994 1006 static int __devinit 995 1007 ether1_probe(struct expansion_card *ec, const struct ecard_id *id) 996 1008 { ··· 1043 1031 goto free; 1044 1032 } 1045 1033 1046 - dev->open = ether1_open; 1047 - dev->stop = ether1_close; 1048 - dev->hard_start_xmit = ether1_sendpacket; 1049 - dev->get_stats = ether1_getstats; 1050 - dev->set_multicast_list = ether1_setmulticastlist; 1051 - dev->tx_timeout = ether1_timeout; 1034 + dev->netdev_ops = &ether1_netdev_ops; 1052 1035 dev->watchdog_timeo = 5 * HZ / 100; 1053 1036 1054 1037 ret = register_netdev(dev);