diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:35:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 22:33:46 -0400 |
commit | 2d44a22254c1c4ad35a58e6d9d15a547d8841efc (patch) | |
tree | a9624cbcf06f5c28c70e393c5250558a655280f0 /drivers/net/irda | |
parent | c279b8c996e99a3fca7806986415263f840b2fa1 (diff) |
irda: convert ali 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/ali-ircc.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index 17779f9bffc4..ad1795580028 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c | |||
@@ -259,6 +259,20 @@ static void __exit ali_ircc_cleanup(void) | |||
259 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__); | 259 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__); |
260 | } | 260 | } |
261 | 261 | ||
262 | static const struct net_device_ops ali_ircc_sir_ops = { | ||
263 | .ndo_open = ali_ircc_net_open, | ||
264 | .ndo_stop = ali_ircc_net_close, | ||
265 | .ndo_start_xmit = ali_ircc_sir_hard_xmit, | ||
266 | .ndo_do_ioctl = ali_ircc_net_ioctl, | ||
267 | }; | ||
268 | |||
269 | static const struct net_device_ops ali_ircc_fir_ops = { | ||
270 | .ndo_open = ali_ircc_net_open, | ||
271 | .ndo_stop = ali_ircc_net_close, | ||
272 | .ndo_start_xmit = ali_ircc_fir_hard_xmit, | ||
273 | .ndo_do_ioctl = ali_ircc_net_ioctl, | ||
274 | }; | ||
275 | |||
262 | /* | 276 | /* |
263 | * Function ali_ircc_open (int i, chipio_t *inf) | 277 | * Function ali_ircc_open (int i, chipio_t *inf) |
264 | * | 278 | * |
@@ -361,10 +375,7 @@ static int ali_ircc_open(int i, chipio_t *info) | |||
361 | self->tx_fifo.tail = self->tx_buff.head; | 375 | self->tx_fifo.tail = self->tx_buff.head; |
362 | 376 | ||
363 | /* Override the network functions we need to use */ | 377 | /* Override the network functions we need to use */ |
364 | dev->hard_start_xmit = ali_ircc_sir_hard_xmit; | 378 | dev->netdev_ops = &ali_ircc_sir_ops; |
365 | dev->open = ali_ircc_net_open; | ||
366 | dev->stop = ali_ircc_net_close; | ||
367 | dev->do_ioctl = ali_ircc_net_ioctl; | ||
368 | 379 | ||
369 | err = register_netdev(dev); | 380 | err = register_netdev(dev); |
370 | if (err) { | 381 | if (err) { |
@@ -974,7 +985,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) | |||
974 | ali_ircc_fir_change_speed(self, baud); | 985 | ali_ircc_fir_change_speed(self, baud); |
975 | 986 | ||
976 | /* Install FIR xmit handler*/ | 987 | /* Install FIR xmit handler*/ |
977 | dev->hard_start_xmit = ali_ircc_fir_hard_xmit; | 988 | dev->netdev_ops = &ali_ircc_fir_ops; |
978 | 989 | ||
979 | /* Enable Interuupt */ | 990 | /* Enable Interuupt */ |
980 | self->ier = IER_EOM; // benjamin 2000/11/20 07:24PM | 991 | self->ier = IER_EOM; // benjamin 2000/11/20 07:24PM |
@@ -988,7 +999,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) | |||
988 | ali_ircc_sir_change_speed(self, baud); | 999 | ali_ircc_sir_change_speed(self, baud); |
989 | 1000 | ||
990 | /* Install SIR xmit handler*/ | 1001 | /* Install SIR xmit handler*/ |
991 | dev->hard_start_xmit = ali_ircc_sir_hard_xmit; | 1002 | dev->netdev_ops = &ali_ircc_sir_ops; |
992 | } | 1003 | } |
993 | 1004 | ||
994 | 1005 | ||