diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 20:35:44 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-22 03:33:49 +0100 |
commit | 2b023f46cbc6187f6ee88e778ed798745b5b2bfe (patch) | |
tree | d71e3fd4ed1e24ebe8674ed5e8af51aa4dae9d94 /drivers/net/irda | |
parent | irda: convert via-ircc to net_device_ops (diff) | |
download | linux-2b023f46cbc6187f6ee88e778ed798745b5b2bfe.tar.xz linux-2b023f46cbc6187f6ee88e778ed798745b5b2bfe.zip |
irda: convert sir device to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/sir_dev.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c index 803c0be3fc7e..d940809762ec 100644 --- a/drivers/net/irda/sir_dev.c +++ b/drivers/net/irda/sir_dev.c @@ -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__); |