diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-02-07 03:16:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:34 -0500 |
commit | cfccaeea62f020242e59a992e1f1a60fe7e5694e (patch) | |
tree | d6cc42c199836ec94221f05008766ad81c5bacdc /drivers/char/istallion.c | |
parent | d2e7a4b66d762cad383c5469c1e8b6076792ab6a (diff) |
Char: istallion, remove hangup bottomhalf
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>
Diffstat (limited to 'drivers/char/istallion.c')
-rw-r--r-- | drivers/char/istallion.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 1f27be1ec3d4..c645455c3fd1 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -627,7 +627,6 @@ static int stli_initopen(struct stlibrd *brdp, struct stliport *portp); | |||
627 | static int stli_rawopen(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait); | 627 | static int stli_rawopen(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait); |
628 | static int stli_rawclose(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait); | 628 | static int stli_rawclose(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait); |
629 | static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct file *filp); | 629 | static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct file *filp); |
630 | static void stli_dohangup(struct work_struct *); | ||
631 | static int stli_setport(struct stliport *portp); | 630 | static int stli_setport(struct stliport *portp); |
632 | static int stli_cmdwait(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback); | 631 | static int stli_cmdwait(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback); |
633 | static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback); | 632 | static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback); |
@@ -1824,25 +1823,6 @@ static void stli_start(struct tty_struct *tty) | |||
1824 | /*****************************************************************************/ | 1823 | /*****************************************************************************/ |
1825 | 1824 | ||
1826 | /* | 1825 | /* |
1827 | * Scheduler called hang up routine. This is called from the scheduler, | ||
1828 | * not direct from the driver "poll" routine. We can't call it there | ||
1829 | * since the real local hangup code will enable/disable the board and | ||
1830 | * other things that we can't do while handling the poll. Much easier | ||
1831 | * to deal with it some time later (don't really care when, hangups | ||
1832 | * aren't that time critical). | ||
1833 | */ | ||
1834 | |||
1835 | static void stli_dohangup(struct work_struct *ugly_api) | ||
1836 | { | ||
1837 | struct stliport *portp = container_of(ugly_api, struct stliport, tqhangup); | ||
1838 | if (portp->tty != NULL) { | ||
1839 | tty_hangup(portp->tty); | ||
1840 | } | ||
1841 | } | ||
1842 | |||
1843 | /*****************************************************************************/ | ||
1844 | |||
1845 | /* | ||
1846 | * Hangup this port. This is pretty much like closing the port, only | 1826 | * Hangup this port. This is pretty much like closing the port, only |
1847 | * a little more brutal. No waiting for data to drain. Shutdown the | 1827 | * a little more brutal. No waiting for data to drain. Shutdown the |
1848 | * port and maybe drop signals. This is rather tricky really. We want | 1828 | * port and maybe drop signals. This is rather tricky really. We want |
@@ -2405,7 +2385,7 @@ static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp) | |||
2405 | ((portp->sigs & TIOCM_CD) == 0)) { | 2385 | ((portp->sigs & TIOCM_CD) == 0)) { |
2406 | if (portp->flags & ASYNC_CHECK_CD) { | 2386 | if (portp->flags & ASYNC_CHECK_CD) { |
2407 | if (tty) | 2387 | if (tty) |
2408 | schedule_work(&portp->tqhangup); | 2388 | tty_hangup(tty); |
2409 | } | 2389 | } |
2410 | } | 2390 | } |
2411 | } | 2391 | } |
@@ -2733,7 +2713,6 @@ static int stli_initports(struct stlibrd *brdp) | |||
2733 | portp->baud_base = STL_BAUDBASE; | 2713 | portp->baud_base = STL_BAUDBASE; |
2734 | portp->close_delay = STL_CLOSEDELAY; | 2714 | portp->close_delay = STL_CLOSEDELAY; |
2735 | portp->closing_wait = 30 * HZ; | 2715 | portp->closing_wait = 30 * HZ; |
2736 | INIT_WORK(&portp->tqhangup, stli_dohangup); | ||
2737 | init_waitqueue_head(&portp->open_wait); | 2716 | init_waitqueue_head(&portp->open_wait); |
2738 | init_waitqueue_head(&portp->close_wait); | 2717 | init_waitqueue_head(&portp->close_wait); |
2739 | init_waitqueue_head(&portp->raw_wait); | 2718 | init_waitqueue_head(&portp->raw_wait); |