mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
staging: speakup: keypc: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
62c8c835ed
commit
e6f1838373
1 changed files with 10 additions and 10 deletions
|
@ -187,26 +187,26 @@ static void do_catch_up(struct spk_synth *synth)
|
|||
jiffy_delta = spk_get_var(JIFFY);
|
||||
delay_time = spk_get_var(DELAY);
|
||||
full_time = spk_get_var(FULL);
|
||||
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;
|
||||
}
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
full_time_val = full_time->u.n.value;
|
||||
spk_unlock(flags);
|
||||
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
|
||||
if (synth_full()) {
|
||||
schedule_timeout(msecs_to_jiffies(full_time_val));
|
||||
continue;
|
||||
|
@ -220,9 +220,9 @@ spk_lock(flags);
|
|||
oops();
|
||||
break;
|
||||
}
|
||||
spk_lock(flags);
|
||||
spin_lock_irqsave(&speakup_info.spinlock, flags);
|
||||
ch = synth_buffer_getc();
|
||||
spk_unlock(flags);
|
||||
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
|
||||
if (ch == '\n')
|
||||
ch = PROCSPEECH;
|
||||
outb_p(ch, synth_port);
|
||||
|
@ -237,10 +237,10 @@ spk_lock(flags);
|
|||
break;
|
||||
}
|
||||
outb_p(PROCSPEECH, synth_port);
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue