aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 15:35:52 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-21 22:41:00 -0400
commitc266cb4ef2ef1f1e3f46d81022939feebe8fa54d (patch)
treea2db68f0a417f927e4ec07760c61b3b41b3b01e2 /drivers/net/usb
parentd79f7ef48b0897458a4df30085338aeb7fb85ffc (diff)
usbnet: convert hso driver to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/hso.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index f49cc7b50c7e..cde423c6d040 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2428,6 +2428,13 @@ static void hso_free_net_device(struct hso_device *hso_dev)
2428 kfree(hso_dev); 2428 kfree(hso_dev);
2429} 2429}
2430 2430
2431static const struct net_device_ops hso_netdev_ops = {
2432 .ndo_open = hso_net_open,
2433 .ndo_stop = hso_net_close,
2434 .ndo_start_xmit = hso_net_start_xmit,
2435 .ndo_tx_timeout = hso_net_tx_timeout,
2436};
2437
2431/* initialize the network interface */ 2438/* initialize the network interface */
2432static void hso_net_init(struct net_device *net) 2439static void hso_net_init(struct net_device *net)
2433{ 2440{
@@ -2436,10 +2443,7 @@ static void hso_net_init(struct net_device *net)
2436 D1("sizeof hso_net is %d", (int)sizeof(*hso_net)); 2443 D1("sizeof hso_net is %d", (int)sizeof(*hso_net));
2437 2444
2438 /* fill in the other fields */ 2445 /* fill in the other fields */
2439 net->open = hso_net_open; 2446 net->netdev_ops = &hso_netdev_ops;
2440 net->stop = hso_net_close;
2441 net->hard_start_xmit = hso_net_start_xmit;
2442 net->tx_timeout = hso_net_tx_timeout;
2443 net->watchdog_timeo = HSO_NET_TX_TIMEOUT; 2447 net->watchdog_timeo = HSO_NET_TX_TIMEOUT;
2444 net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST; 2448 net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
2445 net->type = ARPHRD_NONE; 2449 net->type = ARPHRD_NONE;