staging: bcm2835-audio: Clean up mutex locks
snd-bcm2835 driver takes the lock with mutex_lock_interruptible() in all places, which don't make sense. Replace them with the simple mutex_lock(). Also taking a mutex lock right after creating it for each PCM object is nonsense, too. It cannot be racy at that point. We can get rid of it. Last but not least, initializing chip->audio_mutex at each place is error-prone. Initialize properly at creating the chip object in snd_bcm2835_create() instead. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment