Commit dd99888a authored by Linus Torvalds's avatar Linus Torvalds

Fix up DIGI driver for work-queue abstraction

parent 0b401e25
...@@ -142,8 +142,6 @@ static struct tty_driver *pcxe_driver; ...@@ -142,8 +142,6 @@ static struct tty_driver *pcxe_driver;
static struct timer_list pcxx_timer; static struct timer_list pcxx_timer;
DECLARE_TASK_QUEUE(tq_pcxx);
static void pcxxpoll(unsigned long dummy); static void pcxxpoll(unsigned long dummy);
static void fepcmd(struct channel *, int, int, int, int, int); static void fepcmd(struct channel *, int, int, int, int, int);
static void pcxe_put_char(struct tty_struct *, unsigned char); static void pcxe_put_char(struct tty_struct *, unsigned char);
...@@ -161,7 +159,6 @@ static void receive_data(struct channel *); ...@@ -161,7 +159,6 @@ static void receive_data(struct channel *);
static void pcxxparam(struct tty_struct *, struct channel *ch); static void pcxxparam(struct tty_struct *, struct channel *ch);
static void do_softint(void *); static void do_softint(void *);
static inline void pcxe_sched_event(struct channel *, int); static inline void pcxe_sched_event(struct channel *, int);
static void do_pcxe_bh(void);
static void pcxe_start(struct tty_struct *); static void pcxe_start(struct tty_struct *);
static void pcxe_stop(struct tty_struct *); static void pcxe_stop(struct tty_struct *);
static void pcxe_throttle(struct tty_struct *); static void pcxe_throttle(struct tty_struct *);
...@@ -220,7 +217,6 @@ static void pcxe_cleanup() ...@@ -220,7 +217,6 @@ static void pcxe_cleanup()
save_flags(flags); save_flags(flags);
cli(); cli();
del_timer_sync(&pcxx_timer); del_timer_sync(&pcxx_timer);
remove_bh(DIGI_BH);
if ((e1 = tty_unregister_driver(pcxe_driver))) if ((e1 = tty_unregister_driver(pcxe_driver)))
printk("SERIAL: failed to unregister serial driver (%d)\n", e1); printk("SERIAL: failed to unregister serial driver (%d)\n", e1);
...@@ -312,8 +308,7 @@ static inline void assertmemoff(struct channel *ch) ...@@ -312,8 +308,7 @@ static inline void assertmemoff(struct channel *ch)
static inline void pcxe_sched_event(struct channel *info, int event) static inline void pcxe_sched_event(struct channel *info, int event)
{ {
info->event |= 1 << event; info->event |= 1 << event;
queue_task(&info->tqueue, &tq_pcxx); schedule_work(&info->tqueue);
mark_bh(DIGI_BH);
} }
static void pcxx_error(int line, char *msg) static void pcxx_error(int line, char *msg)
...@@ -1150,8 +1145,6 @@ int __init pcxe_init(void) ...@@ -1150,8 +1145,6 @@ int __init pcxe_init(void)
} }
memset(digi_channels, 0, sizeof(struct channel) * nbdevs); memset(digi_channels, 0, sizeof(struct channel) * nbdevs);
init_bh(DIGI_BH,do_pcxe_bh);
init_timer(&pcxx_timer); init_timer(&pcxx_timer);
pcxx_timer.function = pcxxpoll; pcxx_timer.function = pcxxpoll;
...@@ -1450,8 +1443,7 @@ int __init pcxe_init(void) ...@@ -1450,8 +1443,7 @@ int __init pcxe_init(void)
} }
ch->brdchan = bc; ch->brdchan = bc;
ch->mailbox = gd; ch->mailbox = gd;
ch->tqueue.routine = do_softint; INIT_WORK(&ch->tqueue, do_softint, ch);
ch->tqueue.data = ch;
ch->board = &boards[crd]; ch->board = &boards[crd];
#ifdef DEFAULT_HW_FLOW #ifdef DEFAULT_HW_FLOW
ch->digiext.digi_flags = RTSPACE|CTSPACE; ch->digiext.digi_flags = RTSPACE|CTSPACE;
...@@ -2254,11 +2246,6 @@ static void pcxe_set_termios(struct tty_struct *tty, struct termios *old_termios ...@@ -2254,11 +2246,6 @@ static void pcxe_set_termios(struct tty_struct *tty, struct termios *old_termios
} }
static void do_pcxe_bh(void)
{
run_task_queue(&tq_pcxx);
}
static void do_softint(void *private_) static void do_softint(void *private_)
{ {
......
...@@ -85,10 +85,10 @@ struct channel { ...@@ -85,10 +85,10 @@ struct channel {
int count; int count;
int blocked_open; int blocked_open;
int close_delay; int close_delay;
int event; unsigned long event;
wait_queue_head_t open_wait; wait_queue_head_t open_wait;
wait_queue_head_t close_wait; wait_queue_head_t close_wait;
struct tq_struct tqueue; struct work_struct tqueue;
/* ------------ Async control data ------------- */ /* ------------ Async control data ------------- */
unchar modemfake; /* Modem values to be forced */ unchar modemfake; /* Modem values to be forced */
unchar modem; /* Force values */ unchar modem; /* Force values */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment