aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/ksdazzle-sir.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/ksdazzle-sir.c')
-rw-r--r--drivers/net/irda/ksdazzle-sir.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c
index 5b327b09acd8..64df27f2bfd4 100644
--- a/drivers/net/irda/ksdazzle-sir.c
+++ b/drivers/net/irda/ksdazzle-sir.c
@@ -562,6 +562,13 @@ static int ksdazzle_net_ioctl(struct net_device *netdev, struct ifreq *rq,
562 return ret; 562 return ret;
563} 563}
564 564
565static const struct net_device_ops ksdazzle_ops = {
566 .ndo_start_xmit = ksdazzle_hard_xmit,
567 .ndo_open = ksdazzle_net_open,
568 .ndo_stop = ksdazzle_net_close,
569 .ndo_do_ioctl = ksdazzle_net_ioctl,
570};
571
565/* 572/*
566 * This routine is called by the USB subsystem for each new device 573 * This routine is called by the USB subsystem for each new device
567 * in the system. We need to check if the device is ours, and in 574 * in the system. We need to check if the device is ours, and in
@@ -684,10 +691,7 @@ static int ksdazzle_probe(struct usb_interface *intf,
684 irda_qos_bits_to_value(&kingsun->qos); 691 irda_qos_bits_to_value(&kingsun->qos);
685 692
686 /* Override the network functions we need to use */ 693 /* Override the network functions we need to use */
687 net->hard_start_xmit = ksdazzle_hard_xmit; 694 net->netdev_ops = &ksdazzle_ops;
688 net->open = ksdazzle_net_open;
689 net->stop = ksdazzle_net_close;
690 net->do_ioctl = ksdazzle_net_ioctl;
691 695
692 ret = register_netdev(net); 696 ret = register_netdev(net);
693 if (ret != 0) 697 if (ret != 0)