Commit ddc2a92d authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

irda: convert mcs driver to net_device_ops

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d36733af
...@@ -873,6 +873,13 @@ static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev) ...@@ -873,6 +873,13 @@ static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
return ret; return ret;
} }
static const struct net_device_ops mcs_netdev_ops = {
.ndo_open = mcs_net_open,
.ndo_stop = mcs_net_close,
.ndo_start_xmit = mcs_hard_xmit,
.ndo_do_ioctl = mcs_net_ioctl,
};
/* /*
* This function is called by the USB subsystem for each new device in the * This function is called by the USB subsystem for each new device in the
* system. Need to verify the device and if it is, then start handling it. * system. Need to verify the device and if it is, then start handling it.
...@@ -919,11 +926,7 @@ static int mcs_probe(struct usb_interface *intf, ...@@ -919,11 +926,7 @@ static int mcs_probe(struct usb_interface *intf,
/* Speed change work initialisation*/ /* Speed change work initialisation*/
INIT_WORK(&mcs->work, mcs_speed_work); INIT_WORK(&mcs->work, mcs_speed_work);
/* Override the network functions we need to use */ ndev->netdev_ops = &mcs_netdev_ops;
ndev->hard_start_xmit = mcs_hard_xmit;
ndev->open = mcs_net_open;
ndev->stop = mcs_net_close;
ndev->do_ioctl = mcs_net_ioctl;
if (!intf->cur_altsetting) if (!intf->cur_altsetting)
goto error2; goto error2;
......
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