diff options
Diffstat (limited to 'drivers/net/hamradio/baycom_epp.c')
-rw-r--r-- | drivers/net/hamradio/baycom_epp.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index 1ed9cccd3c11..3c33d6f6a6a6 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c | |||
@@ -168,8 +168,9 @@ struct baycom_state { | |||
168 | int magic; | 168 | int magic; |
169 | 169 | ||
170 | struct pardevice *pdev; | 170 | struct pardevice *pdev; |
171 | struct net_device *dev; | ||
171 | unsigned int work_running; | 172 | unsigned int work_running; |
172 | struct work_struct run_work; | 173 | struct delayed_work run_work; |
173 | unsigned int modem; | 174 | unsigned int modem; |
174 | unsigned int bitrate; | 175 | unsigned int bitrate; |
175 | unsigned char stat; | 176 | unsigned char stat; |
@@ -659,16 +660,18 @@ static int receive(struct net_device *dev, int cnt) | |||
659 | #define GETTICK(x) | 660 | #define GETTICK(x) |
660 | #endif /* __i386__ */ | 661 | #endif /* __i386__ */ |
661 | 662 | ||
662 | static void epp_bh(struct net_device *dev) | 663 | static void epp_bh(struct work_struct *work) |
663 | { | 664 | { |
665 | struct net_device *dev; | ||
664 | struct baycom_state *bc; | 666 | struct baycom_state *bc; |
665 | struct parport *pp; | 667 | struct parport *pp; |
666 | unsigned char stat; | 668 | unsigned char stat; |
667 | unsigned char tmp[2]; | 669 | unsigned char tmp[2]; |
668 | unsigned int time1 = 0, time2 = 0, time3 = 0; | 670 | unsigned int time1 = 0, time2 = 0, time3 = 0; |
669 | int cnt, cnt2; | 671 | int cnt, cnt2; |
670 | 672 | ||
671 | bc = netdev_priv(dev); | 673 | bc = container_of(work, struct baycom_state, run_work.work); |
674 | dev = bc->dev; | ||
672 | if (!bc->work_running) | 675 | if (!bc->work_running) |
673 | return; | 676 | return; |
674 | baycom_int_freq(bc); | 677 | baycom_int_freq(bc); |
@@ -889,7 +892,7 @@ static int epp_open(struct net_device *dev) | |||
889 | return -EBUSY; | 892 | return -EBUSY; |
890 | } | 893 | } |
891 | dev->irq = /*pp->irq*/ 0; | 894 | dev->irq = /*pp->irq*/ 0; |
892 | INIT_WORK(&bc->run_work, (void *)(void *)epp_bh, dev); | 895 | INIT_DELAYED_WORK(&bc->run_work, epp_bh); |
893 | bc->work_running = 1; | 896 | bc->work_running = 1; |
894 | bc->modem = EPP_CONVENTIONAL; | 897 | bc->modem = EPP_CONVENTIONAL; |
895 | if (eppconfig(bc)) | 898 | if (eppconfig(bc)) |
@@ -1213,6 +1216,7 @@ static void __init baycom_epp_dev_setup(struct net_device *dev) | |||
1213 | /* | 1216 | /* |
1214 | * initialize part of the baycom_state struct | 1217 | * initialize part of the baycom_state struct |
1215 | */ | 1218 | */ |
1219 | bc->dev = dev; | ||
1216 | bc->magic = BAYCOM_MAGIC; | 1220 | bc->magic = BAYCOM_MAGIC; |
1217 | bc->cfg.fclk = 19666600; | 1221 | bc->cfg.fclk = 19666600; |
1218 | bc->cfg.bps = 9600; | 1222 | bc->cfg.bps = 9600; |