irda: convert sir device to net_device_ops
authorStephen Hemminger <shemminger@vyatta.com>
Fri, 20 Mar 2009 19:35:44 +0000 (19:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Mar 2009 02:33:49 +0000 (19:33 -0700)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/sir_dev.c

index 803c0be3fc7ed883230ef371708e5e4319d6a2f9..d940809762eca2bafa6c2966e4fc1b717b863d20 100644 (file)
@@ -865,6 +865,12 @@ out:
        return 0;
 }
 
+static const struct net_device_ops sirdev_ops = {
+       .ndo_start_xmit = sirdev_hard_xmit,
+       .ndo_open       = sirdev_open,
+       .ndo_stop       = sirdev_close,
+       .ndo_do_ioctl   = sirdev_ioctl,
+};
 /* ----------------------------------------------------------------------------- */
 
 struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *name)
@@ -908,10 +914,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
        dev->netdev = ndev;
 
        /* Override the network functions we need to use */
-       ndev->hard_start_xmit = sirdev_hard_xmit;
-       ndev->open = sirdev_open;
-       ndev->stop = sirdev_close;
-       ndev->do_ioctl = sirdev_ioctl;
+       ndev->netdev_ops = &sirdev_ops;
 
        if (register_netdev(ndev)) {
                IRDA_ERROR("%s(), register_netdev() failed!\n", __func__);