aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/speakup_decext.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2014-11-20 14:42:02 +0100
committerJiri Kosina <jkosina@suse.cz>2014-11-20 14:42:02 +0100
commita02001086bbfb4da35d1228bebc2f1b442db455f (patch)
tree62ab47936cef06fd08657ca5b6cd1df98c19be57 /drivers/staging/speakup/speakup_decext.c
parentkernel: trace: fix printk message (diff)
parentLinux 3.18-rc5 (diff)
downloadlinux-dev-a02001086bbfb4da35d1228bebc2f1b442db455f.tar.xz
linux-dev-a02001086bbfb4da35d1228bebc2f1b442db455f.zip
Merge Linus' tree to be be to apply submitted patches to newer code than
current trivial.git base
Diffstat (limited to 'drivers/staging/speakup/speakup_decext.c')
-rw-r--r--drivers/staging/speakup/speakup_decext.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c
index 67b7de1d8c75..555029036dc2 100644
--- a/drivers/staging/speakup/speakup_decext.c
+++ b/drivers/staging/speakup/speakup_decext.c
@@ -39,6 +39,7 @@ static unsigned char last_char;
static inline u_char get_last_char(void)
{
u_char avail = inb_p(speakup_info.port_tts + UART_LSR) & UART_LSR_DR;
+
if (avail)
last_char = inb_p(speakup_info.port_tts + UART_RX);
return last_char;
@@ -203,7 +204,7 @@ static void do_catch_up(struct spk_synth *synth)
else if (ch <= SPACE) {
if (!in_escape && strchr(",.!?;:", last))
spk_serial_out(PROCSPEECH);
- if (jiffies >= jiff_max) {
+ if (time_after_eq(jiffies, jiff_max)) {
if (!in_escape)
spk_serial_out(PROCSPEECH);
spin_lock_irqsave(&speakup_info.spinlock, flags);