Merge 3.10-rc6 into staging-next
[sfrench/cifs-2.6.git] / drivers / staging / speakup / speakup_decpc.c
index 6c88b55bdac8172190176776ae1bc52ec9c0e20a..ea6b72d40b317f9eb342b66c9a3c762b8f6f96cb 100644 (file)
@@ -377,27 +377,27 @@ static void do_catch_up(struct spk_synth *synth)
 
        jiffy_delta = spk_get_var(JIFFY);
        delay_time = spk_get_var(DELAY);
-       spk_lock(flags);
+       spin_lock_irqsave(&speakup_info.spinlock, flags);
        jiffy_delta_val = jiffy_delta->u.n.value;
-       spk_unlock(flags);
+       spin_unlock_irqrestore(&speakup_info.spinlock, flags);
        jiff_max = jiffies + jiffy_delta_val;
 
        while (!kthread_should_stop()) {
-               spk_lock(flags);
+               spin_lock_irqsave(&speakup_info.spinlock, flags);
                if (speakup_info.flushing) {
                        speakup_info.flushing = 0;
-                       spk_unlock(flags);
+                       spin_unlock_irqrestore(&speakup_info.spinlock, flags);
                        synth->flush(synth);
                        continue;
                }
                if (synth_buffer_empty()) {
-                       spk_unlock(flags);
+                       spin_unlock_irqrestore(&speakup_info.spinlock, flags);
                        break;
                }
                ch = synth_buffer_peek();
                set_current_state(TASK_INTERRUPTIBLE);
                delay_time_val = delay_time->u.n.value;
-               spk_unlock(flags);
+               spin_unlock_irqrestore(&speakup_info.spinlock, flags);
                if (ch == '\n')
                        ch = 0x0D;
                if (dt_sendchar(ch)) {
@@ -405,9 +405,9 @@ static void do_catch_up(struct spk_synth *synth)
                        continue;
                }
                set_current_state(TASK_RUNNING);
-               spk_lock(flags);
+               spin_lock_irqsave(&speakup_info.spinlock, flags);
                synth_buffer_getc();
-               spk_unlock(flags);
+               spin_unlock_irqrestore(&speakup_info.spinlock, flags);
                if (ch == '[')
                        in_escape = 1;
                else if (ch == ']')
@@ -418,10 +418,10 @@ static void do_catch_up(struct spk_synth *synth)
                        if (jiffies >= jiff_max) {
                                if (!in_escape)
                                        dt_sendchar(PROCSPEECH);
-                               spk_lock(flags);
+                               spin_lock_irqsave(&speakup_info.spinlock, flags);
                                jiffy_delta_val = jiffy_delta->u.n.value;
                                delay_time_val = delay_time->u.n.value;
-                               spk_unlock(flags);
+                               spin_unlock_irqrestore(&speakup_info.spinlock, flags);
                                schedule_timeout(msecs_to_jiffies
                                                 (delay_time_val));
                                jiff_max = jiffies + jiffy_delta_val;
@@ -444,7 +444,7 @@ static const char *synth_immediate(struct spk_synth *synth, const char *buf)
                        return buf;
                buf++;
        }
-       return 0;
+       return NULL;
 }
 
 static int synth_probe(struct spk_synth *synth)