summaryrefslogtreecommitdiffstats
path: root/drivers/staging/cx25821/cx25821-alsa.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-03-02 17:15:15 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 20:32:41 -0300
commit0cd301f19a91b3e1fb4130dcd9106777003ed4ed (patch)
tree5c6f30efc843196c15618a78f68cf22049caf8d5 /drivers/staging/cx25821/cx25821-alsa.c
parentdc46b8c8e3d7e6c7c7ddb78fc2137a5462e98679 (diff)
downloadop-kernel-dev-0cd301f19a91b3e1fb4130dcd9106777003ed4ed.zip
op-kernel-dev-0cd301f19a91b3e1fb4130dcd9106777003ed4ed.tar.gz
[media] staging/cx25721: serialize access to devlist
Out of the three files accessing the device list, one uses a mutex, one uses the BKL and one does not have any locking. That is of course pointless, so let's make all of them use the same mutex, and get rid of one more BKL user. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/cx25821/cx25821-alsa.c')
-rw-r--r--drivers/staging/cx25821/cx25821-alsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/cx25821/cx25821-alsa.c b/drivers/staging/cx25821/cx25821-alsa.c
index 160f669..ebdba7c 100644
--- a/drivers/staging/cx25821/cx25821-alsa.c
+++ b/drivers/staging/cx25821/cx25821-alsa.c
@@ -770,10 +770,12 @@ static int cx25821_alsa_init(void)
struct cx25821_dev *dev = NULL;
struct list_head *list;
+ mutex_lock(&cx25821_devlist_mutex);
list_for_each(list, &cx25821_devlist) {
dev = list_entry(list, struct cx25821_dev, devlist);
cx25821_audio_initdev(dev);
}
+ mutex_unlock(&cx25821_devlist_mutex);
if (dev == NULL)
pr_info("ERROR ALSA: no cx25821 cards found\n");
OpenPOWER on IntegriCloud