diff options
-rw-r--r-- | drivers/net/irda/w83977af_ir.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index dc0a2e4d830f..d0883835b0c6 100644 --- a/drivers/net/irda/w83977af_ir.c +++ b/drivers/net/irda/w83977af_ir.c | |||
@@ -140,6 +140,13 @@ static void __exit w83977af_cleanup(void) | |||
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | static const struct net_device_ops w83977_netdev_ops = { | ||
144 | .ndo_open = w83977af_net_open, | ||
145 | .ndo_stop = w83977af_net_close, | ||
146 | .ndo_start_xmit = w83977af_hard_xmit, | ||
147 | .ndo_do_ioctl = w83977af_net_ioctl, | ||
148 | }; | ||
149 | |||
143 | /* | 150 | /* |
144 | * Function w83977af_open (iobase, irq) | 151 | * Function w83977af_open (iobase, irq) |
145 | * | 152 | * |
@@ -231,11 +238,7 @@ static int w83977af_open(int i, unsigned int iobase, unsigned int irq, | |||
231 | self->rx_buff.data = self->rx_buff.head; | 238 | self->rx_buff.data = self->rx_buff.head; |
232 | self->netdev = dev; | 239 | self->netdev = dev; |
233 | 240 | ||
234 | /* Override the network functions we need to use */ | 241 | dev->netdev_ops = &w83977_netdev_ops; |
235 | dev->hard_start_xmit = w83977af_hard_xmit; | ||
236 | dev->open = w83977af_net_open; | ||
237 | dev->stop = w83977af_net_close; | ||
238 | dev->do_ioctl = w83977af_net_ioctl; | ||
239 | 242 | ||
240 | err = register_netdev(dev); | 243 | err = register_netdev(dev); |
241 | if (err) { | 244 | if (err) { |