diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 19:35:36 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 19:19:17 -0700 |
commit | ddc2a92d34ba20b47e1856375c68d25f51e86f53 (patch) | |
tree | 95a3f612c8d0a594f58e3916fcd21cb0ed6be16e /drivers/net/irda | |
parent | d36733afd9b65546e1fe0def5d50d8c4519ee452 (diff) | |
download | linux-ddc2a92d34ba20b47e1856375c68d25f51e86f53.tar.gz linux-ddc2a92d34ba20b47e1856375c68d25f51e86f53.tar.bz2 linux-ddc2a92d34ba20b47e1856375c68d25f51e86f53.zip |
irda: convert mcs driver 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/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) return ret; } +static const struct net_device_ops mcs_netdev_ops = { + .ndo_open = mcs_net_open, + .ndo_stop = mcs_net_close, + .ndo_start_xmit = mcs_hard_xmit, + .ndo_do_ioctl = mcs_net_ioctl, +}; + /* * This function is called by the USB subsystem for each new device in the * 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, /* Speed change work initialisation*/ INIT_WORK(&mcs->work, mcs_speed_work); - /* Override the network functions we need to use */ - ndev->hard_start_xmit = mcs_hard_xmit; - ndev->open = mcs_net_open; - ndev->stop = mcs_net_close; - ndev->do_ioctl = mcs_net_ioctl; + ndev->netdev_ops = &mcs_netdev_ops; if (!intf->cur_altsetting) goto error2; |