Skip to content

Commit

Permalink
Char: istallion, remove hangup bottomhalf
Browse files Browse the repository at this point in the history
tty_hangup schedules a work for hangup itself, no need to do it in the driver.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Feb 7, 2008
1 parent d2e7a4b commit cfccaee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
23 changes: 1 addition & 22 deletions drivers/char/istallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,6 @@ static int stli_initopen(struct stlibrd *brdp, struct stliport *portp);
static int stli_rawopen(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait);
static int stli_rawclose(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait);
static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct file *filp);
static void stli_dohangup(struct work_struct *);
static int stli_setport(struct stliport *portp);
static int stli_cmdwait(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback);
static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback);
Expand Down Expand Up @@ -1823,25 +1822,6 @@ static void stli_start(struct tty_struct *tty)

/*****************************************************************************/

/*
* Scheduler called hang up routine. This is called from the scheduler,
* not direct from the driver "poll" routine. We can't call it there
* since the real local hangup code will enable/disable the board and
* other things that we can't do while handling the poll. Much easier
* to deal with it some time later (don't really care when, hangups
* aren't that time critical).
*/

static void stli_dohangup(struct work_struct *ugly_api)
{
struct stliport *portp = container_of(ugly_api, struct stliport, tqhangup);
if (portp->tty != NULL) {
tty_hangup(portp->tty);
}
}

/*****************************************************************************/

/*
* Hangup this port. This is pretty much like closing the port, only
* a little more brutal. No waiting for data to drain. Shutdown the
Expand Down Expand Up @@ -2405,7 +2385,7 @@ static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp)
((portp->sigs & TIOCM_CD) == 0)) {
if (portp->flags & ASYNC_CHECK_CD) {
if (tty)
schedule_work(&portp->tqhangup);
tty_hangup(tty);
}
}
}
Expand Down Expand Up @@ -2733,7 +2713,6 @@ static int stli_initports(struct stlibrd *brdp)
portp->baud_base = STL_BAUDBASE;
portp->close_delay = STL_CLOSEDELAY;
portp->closing_wait = 30 * HZ;
INIT_WORK(&portp->tqhangup, stli_dohangup);
init_waitqueue_head(&portp->open_wait);
init_waitqueue_head(&portp->close_wait);
init_waitqueue_head(&portp->raw_wait);
Expand Down
1 change: 0 additions & 1 deletion include/linux/istallion.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ struct stliport {
wait_queue_head_t open_wait;
wait_queue_head_t close_wait;
wait_queue_head_t raw_wait;
struct work_struct tqhangup;
struct asysigs asig;
unsigned long addr;
unsigned long rxoffset;
Expand Down

0 comments on commit cfccaee

Please sign in to comment.