[alsa-devel] [PATCH] sound: oss: fix uninitialized spinlock

Takashi Iwai tiwai at suse.de
Sat Aug 28 12:02:03 CEST 2010


At Sat, 28 Aug 2010 13:25:33 +0900,
Akinobu Mita wrote:
> 
> The spinlock lock in sound_timer.c is used without initialization.
> 
> Signed-off-by: Akinobu Mita <akinobu.mita at gmail.com>
> Cc: Takashi Iwai <tiwai at suse.de>
> Cc: Jaroslav Kysela <perex at perex.cz>

Applied now.  Thanks.


Takashi

> ---
>  sound/oss/sound_timer.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/oss/sound_timer.c b/sound/oss/sound_timer.c
> index f0f0c19..48cda6c 100644
> --- a/sound/oss/sound_timer.c
> +++ b/sound/oss/sound_timer.c
> @@ -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)
>  {
> -- 
> 1.6.0.6
> 


More information about the Alsa-devel mailing list