diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2013-05-13 13:31:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-16 16:14:47 -0700 |
commit | 62c8c835ed061b766e48c8646b9b8650e7913866 (patch) | |
tree | b869e205376a73381801144c0d10066e89480acd /drivers | |
parent | 68743d6b26955ed8f2249d7d6cf3417c4cc9801f (diff) |
staging: speakup: dtlk: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/speakup/speakup_dtlk.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c index a9cefbd3ea93..a965378a767e 100644 --- a/drivers/staging/speakup/speakup_dtlk.c +++ b/drivers/staging/speakup/speakup_dtlk.c @@ -200,42 +200,42 @@ 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; } set_current_state(TASK_INTERRUPTIBLE); delay_time_val = delay_time->u.n.value; - spk_unlock(flags); + spin_unlock_irqrestore(&speakup_info.spinlock, flags); if (synth_full()) { schedule_timeout(msecs_to_jiffies(delay_time_val)); continue; } set_current_state(TASK_RUNNING); - 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; spk_out(ch); if ((jiffies >= jiff_max) && (ch == SPACE)) { spk_out(PROCSPEECH); - spk_lock(flags); + spin_lock_irqsave(&speakup_info.spinlock, flags); delay_time_val = delay_time->u.n.value; jiffy_delta_val = jiffy_delta->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; } |