]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
irda: convert w83977af_ir to net_device_ops
authorStephen Hemminger <shemminger@vyatta.com>
Fri, 20 Mar 2009 19:35:38 +0000 (19:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Mar 2009 02:33:45 +0000 (19:33 -0700)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/w83977af_ir.c

index dc0a2e4d830f60c7f7b813785a5103b0e5d06bee..d0883835b0c6e0a179ac8107daaba9e6c204771f 100644 (file)
@@ -140,6 +140,13 @@ static void __exit w83977af_cleanup(void)
        }
 }
 
+static const struct net_device_ops w83977_netdev_ops = {
+       .ndo_open       = w83977af_net_open,
+       .ndo_stop       = w83977af_net_close,
+       .ndo_start_xmit = w83977af_hard_xmit,
+       .ndo_do_ioctl   = w83977af_net_ioctl,
+};
+
 /*
  * Function w83977af_open (iobase, irq)
  *
@@ -231,11 +238,7 @@ static int w83977af_open(int i, unsigned int iobase, unsigned int irq,
        self->rx_buff.data = self->rx_buff.head;
        self->netdev = dev;
 
-       /* Override the network functions we need to use */
-       dev->hard_start_xmit = w83977af_hard_xmit;
-       dev->open            = w83977af_net_open;
-       dev->stop            = w83977af_net_close;
-       dev->do_ioctl        = w83977af_net_ioctl;
+       dev->netdev_ops = &w83977_netdev_ops;
 
        err = register_netdev(dev);
        if (err) {