Skip to contentSkip to conversation

speakup: fix uninitialized flush_lock

PATCH In review Yang Yingliang 2 participants 2 messages Nov 17, 2020 Speakup console speech driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 speakup: fix uninitialized flush_lock

The flush_lock is uninitialized, use DEFINE_SPINLOCK to define and initialize flush_lock.

Fixes c6e3fd22cd53 ("Staging: add speakup to the staging directory")
---
 drivers/accessibility/speakup/speakup_dectlk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accessibility/speakup/speakup_dectlk.c +1 -1
index 780214b5ca16..ab6d61e80b1c 100644
@@ -37,7 +37,7 @@ static unsigned char get_index(struct spk_synth *synth);
 static int in_escape;
 static int is_flushing;
 
-static spinlock_t flush_lock;
+static DEFINE_SPINLOCK(flush_lock);
 static DECLARE_WAIT_QUEUE_HEAD(flush);
 
 static struct var_t vars[] = {
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Yang Yingliang, le mar. 17 nov. 2020 09:22:29 +0800, a ecrit:

Quoted 6 lines

The flush_lock is uninitialized, use DEFINE_SPINLOCK to define and initialize flush_lock.

Fixes c6e3fd22cd53 ("Staging: add speakup to the staging directory")
Quoted 20 lines
---
 drivers/accessibility/speakup/speakup_dectlk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accessibility/speakup/speakup_dectlk.c +1 -1
index 780214b5ca16..ab6d61e80b1c 100644
@@ -37,7 +37,7 @@ static unsigned char get_index(struct spk_synth *synth);
 static int in_escape;
 static int is_flushing;
 
-static spinlock_t flush_lock;
+static DEFINE_SPINLOCK(flush_lock);
 static DECLARE_WAIT_QUEUE_HEAD(flush);
 
 static struct var_t vars[] = {
Signature · 1 line
2.25.1