diff options
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/mcs7780.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index 85e88daab21a..fac504d0cfd8 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c | |||
@@ -873,6 +873,13 @@ static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
873 | return ret; | 873 | return ret; |
874 | } | 874 | } |
875 | 875 | ||
876 | static const struct net_device_ops mcs_netdev_ops = { | ||
877 | .ndo_open = mcs_net_open, | ||
878 | .ndo_stop = mcs_net_close, | ||
879 | .ndo_start_xmit = mcs_hard_xmit, | ||
880 | .ndo_do_ioctl = mcs_net_ioctl, | ||
881 | }; | ||
882 | |||
876 | /* | 883 | /* |
877 | * This function is called by the USB subsystem for each new device in the | 884 | * This function is called by the USB subsystem for each new device in the |
878 | * system. Need to verify the device and if it is, then start handling it. | 885 | * 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 | /* Speed change work initialisation*/ | 926 | /* Speed change work initialisation*/ |
920 | INIT_WORK(&mcs->work, mcs_speed_work); | 927 | INIT_WORK(&mcs->work, mcs_speed_work); |
921 | 928 | ||
922 | /* Override the network functions we need to use */ | 929 | ndev->netdev_ops = &mcs_netdev_ops; |
923 | ndev->hard_start_xmit = mcs_hard_xmit; | ||
924 | ndev->open = mcs_net_open; | ||
925 | ndev->stop = mcs_net_close; | ||
926 | ndev->do_ioctl = mcs_net_ioctl; | ||
927 | 930 | ||
928 | if (!intf->cur_altsetting) | 931 | if (!intf->cur_altsetting) |
929 | goto error2; | 932 | goto error2; |