Try using whatever buffer we can get in smd_tty instead of sitting in an endless loop!
This commit is contained in:
parent
b02a70d538
commit
6df8c16511
@ -78,19 +78,16 @@ static void smd_tty_work_func(struct work_struct *work)
|
||||
ptr = NULL;
|
||||
avail = tty_prepare_flip_string(tty, &ptr, avail);
|
||||
|
||||
if (avail && ptr) {
|
||||
if (smd_read(info->ch, ptr, avail) != avail) {
|
||||
/* shouldn't be possible since we're in interrupt
|
||||
* context here and nobody else could 'steal' our
|
||||
* characters.
|
||||
*/
|
||||
printk(KERN_ERR "OOPS - smd_tty_buffer mismatch?!");
|
||||
}
|
||||
wake_lock_timeout(&info->wake_lock, HZ / 2);
|
||||
tty->low_latency = 1;
|
||||
tty_flip_buffer_push(tty);
|
||||
} else
|
||||
printk(KERN_ERR "smd_tty_work_func: tty_prepare_flip_string fail\n");
|
||||
if (smd_read(info->ch, ptr, avail) != avail) {
|
||||
/* shouldn't be possible since we're in interrupt
|
||||
* context here and nobody else could 'steal' our
|
||||
* characters.
|
||||
*/
|
||||
printk(KERN_ERR "OOPS - smd_tty_buffer mismatch?!");
|
||||
}
|
||||
wake_lock_timeout(&info->wake_lock, HZ / 2);
|
||||
tty->low_latency = 1;
|
||||
tty_flip_buffer_push(tty);
|
||||
}
|
||||
|
||||
mutex_unlock(&smd_tty_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user