From 51e39b55ac89812043bc56aa7c0a4f105ea14443 Mon Sep 17 00:00:00 2001 From: Jon Benson Date: Mon, 6 Dec 2010 19:57:39 +1100 Subject: [PATCH] Another smd_tty patch closer to LeTama's since I still managed to crash things with the last one. --- arch/arm/mach-msm/smd_tty.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-msm/smd_tty.c b/arch/arm/mach-msm/smd_tty.c index f9221527..f994dd96 100644 --- a/arch/arm/mach-msm/smd_tty.c +++ b/arch/arm/mach-msm/smd_tty.c @@ -47,6 +47,7 @@ static void smd_tty_work_func(struct work_struct *work) { unsigned char *ptr; int avail; + int failcnt = 0; struct smd_tty_info *info = container_of(work, struct smd_tty_info, @@ -90,10 +91,11 @@ static void smd_tty_work_func(struct work_struct *work) tty->low_latency = 1; tty_flip_buffer_push(tty); } else { + failcnt++; printk(KERN_ERR "smd_tty_work_func: tty_prepare_flip_string fail\n"); - tty->low_latency = 0; - tty_flip_buffer_push(tty); - break; + if(failcnt > 2) { + break; + } } }