Skip to contentSkip to conversation

sound: oss: fix uninitialized spinlock

PATCH In review Akinobu Mita 2 participants 2 messages Aug 28, 2010 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound: oss: fix uninitialized spinlock

The spinlock lock in sound_timer.c is used without initialization.

Cc Takashi Iwai <[email protected]>
Cc Jaroslav Kysela <[email protected]>
---
 sound/oss/sound_timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/oss/sound_timer.c +1 -1
index f0f0c19..48cda6c 100644
@@ -26,7 +26,7 @@ static unsigned long prev_event_time;
 static volatile unsigned long usecs_per_tmr;	/* Length of the current interval */
 
 static struct sound_lowlev_timer *tmr;
-static spinlock_t lock;
+static DEFINE_SPINLOCK(lock);
 
 static unsigned long tmr2ticks(int tmr_value)
 {
Signature · 1 line
1.6.0.6
#1 lore raw

At Sat, 28 Aug 2010 13:25:33 +0900,

Quoted 6 lines · Akinobu Mita

The spinlock lock in sound_timer.c is used without initialization.

Cc Takashi Iwai <[email protected]>
Cc Jaroslav Kysela <[email protected]>

Applied now. Thanks.

Takashi

Quoted 20 lines
---
 sound/oss/sound_timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/oss/sound_timer.c +1 -1
index f0f0c19..48cda6c 100644
@@ -26,7 +26,7 @@ static unsigned long prev_event_time;
 static volatile unsigned long usecs_per_tmr;	/* Length of the current interval */
 
 static struct sound_lowlev_timer *tmr;
-static spinlock_t lock;
+static DEFINE_SPINLOCK(lock);
 
 static unsigned long tmr2ticks(int tmr_value)
 {
Signature · 1 line
1.6.0.6