diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2013-05-13 13:31:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-16 16:14:50 -0700 |
commit | 667b614118b3bae7d2a82732cdde71730a3d080c (patch) | |
tree | d590315eef7f5efabc7f051dd44057de22fa15c3 /drivers/staging/speakup/synth.c | |
parent | staging: speakup: synth: remove custom locking macros (diff) | |
download | linux-dev-667b614118b3bae7d2a82732cdde71730a3d080c.tar.xz linux-dev-667b614118b3bae7d2a82732cdde71730a3d080c.zip |
staging: speakup: remove custom locking macro definitions
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/synth.c')
-rw-r--r-- | drivers/staging/speakup/synth.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c index 1036f47b9464..e2d84c090d64 100644 --- a/drivers/staging/speakup/synth.c +++ b/drivers/staging/speakup/synth.c @@ -25,6 +25,18 @@ static int module_status; bool spk_quiet_boot; struct speakup_info_t speakup_info = { + /* + * This spinlock is used to protect the entire speakup machinery, and + * must be taken at each kernel->speakup transition and released at + * each corresponding speakup->kernel transition. + * + * The progression thread only interferes with the speakup machinery through + * the synth buffer, so only needs to take the lock while tinkering with + * the buffer. + * + * We use spin_lock/trylock_irqsave and spin_unlock_irqrestore with this + * spinlock because speakup needs to disable the keyboard IRQ. + */ .spinlock = __SPIN_LOCK_UNLOCKED(speakup_info.spinlock), .flushing = 0, }; |