aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2011-08-25 09:12:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-25 12:00:42 -0400
commit0b058353abfcdba4403af60f06998da590ebeffe (patch)
tree6e4012e7b9f99b2772849edb15b65c1e3a8e2fed /drivers/tty/hvc
parent424cc0391222695225632a3f2ccb0aed3e57b2e5 (diff)
TTY: use tty_wait_until_sent_from_close in other drivers
Let's use the newly added helper to avoid stalls in drivers which are not yet ported to tty_port helpers. Those which are broken (call tty_wait_until_sent with irqs disabled) are left untouched. They are in a deeper trouble than we are trying to solve here. This includes amiserial, 68328serial, 68360serial and crisv10. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/hvc')
-rw-r--r--drivers/tty/hvc/hvc_console.c2
-rw-r--r--drivers/tty/hvc/hvcs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index e1aaf4f309b3..b6b2d18fa38d 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -388,7 +388,7 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
388 * there is no buffered data otherwise sleeps on a wait queue 388 * there is no buffered data otherwise sleeps on a wait queue
389 * waking periodically to check chars_in_buffer(). 389 * waking periodically to check chars_in_buffer().
390 */ 390 */
391 tty_wait_until_sent(tty, HVC_CLOSE_WAIT); 391 tty_wait_until_sent_from_close(tty, HVC_CLOSE_WAIT);
392 } else { 392 } else {
393 if (hp->count < 0) 393 if (hp->count < 0)
394 printk(KERN_ERR "hvc_close %X: oops, count is %d\n", 394 printk(KERN_ERR "hvc_close %X: oops, count is %d\n",
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 4c8b66546930..e523773a5480 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -1237,7 +1237,7 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
1237 irq = hvcsd->vdev->irq; 1237 irq = hvcsd->vdev->irq;
1238 spin_unlock_irqrestore(&hvcsd->lock, flags); 1238 spin_unlock_irqrestore(&hvcsd->lock, flags);
1239 1239
1240 tty_wait_until_sent(tty, HVCS_CLOSE_WAIT); 1240 tty_wait_until_sent_from_close(tty, HVCS_CLOSE_WAIT);
1241 1241
1242 /* 1242 /*
1243 * This line is important because it tells hvcs_open that this 1243 * This line is important because it tells hvcs_open that this