]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/staging/speakup/speakup_keypc.c
Merge tag 'hwparam-20170420' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowell...
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / speakup / speakup_keypc.c
index e653b52175b88cf332ff4b0b998da99cd2a730a2..d3203f8fc3d04ca8666a65fb5e44e956b86f31aa 100644 (file)
@@ -105,6 +105,7 @@ static struct spk_synth synth_keypc = {
        .startup = SYNTH_START,
        .checkval = SYNTH_CHECK,
        .vars = vars,
+       .io_ops = &spk_serial_io_ops,
        .probe = synth_probe,
        .release = keynote_release,
        .synth_immediate = synth_immediate,
@@ -141,9 +142,9 @@ static char *oops(void)
        int s1, s2, s3, s4;
 
        s1 = inb_p(synth_port);
-       s2 = inb_p(synth_port+1);
-       s3 = inb_p(synth_port+2);
-       s4 = inb_p(synth_port+3);
+       s2 = inb_p(synth_port + 1);
+       s3 = inb_p(synth_port + 2);
+       s4 = inb_p(synth_port + 3);
        pr_warn("synth timeout %d %d %d %d\n", s1, s2, s3, s4);
        return NULL;
 }
@@ -198,6 +199,7 @@ spin_lock_irqsave(&speakup_info.spinlock, flags);
                        synth->flush(synth);
                        continue;
                }
+               synth_buffer_skip_nonlatin1();
                if (synth_buffer_empty()) {
                        spin_unlock_irqrestore(&speakup_info.spinlock, flags);
                        break;
@@ -304,6 +306,7 @@ static int synth_probe(struct spk_synth *synth)
 
 static void keynote_release(void)
 {
+       spk_stop_serial_interrupt();
        if (synth_port)
                synth_release_region(synth_port, SYNTH_IO_EXTENT);
        synth_port = 0;