Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=92ea42f442c4895e38f525a097d7d8ce2a55b9b9 Commit: 92ea42f442c4895e38f525a097d7d8ce2a55b9b9 Parent: 00b8730f5db19f9ea0985d7f14f869df79a0bf76 Author: Mauro Carvalho Chehab <[EMAIL PROTECTED]> AuthorDate: Wed Feb 6 18:52:15 2008 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Mon Feb 18 11:15:16 2008 -0300
V4L/DVB (7164): em28xx-alsa: Add a missing mutex Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/video/em28xx/em28xx-audio.c | 5 +++++ drivers/media/video/em28xx/em28xx.h | 1 - 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index 2c7343d..8c67f67 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c @@ -269,8 +269,11 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream *substream) dprintk("opening device and trying to acquire exclusive lock\n"); /* Sets volume, mute, etc */ + dev->mute = 0; + mutex_lock(&dev->lock); ret = em28xx_audio_analog_set(dev); + mutex_unlock(&dev->lock); if (ret < 0) goto err; @@ -302,7 +305,9 @@ static int snd_em28xx_pcm_close(struct snd_pcm_substream *substream) dprintk("closing device\n"); dev->mute = 1; + mutex_lock(&dev->lock); em28xx_audio_analog_set(dev); + mutex_unlock(&dev->lock); if (dev->adev->users == 0 && dev->adev->shutdown == 1) { dprintk("audio users: %d\n", dev->adev->users); diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 9759a73..813c0af 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h @@ -345,7 +345,6 @@ int em28xx_read_reg(struct em28xx *dev, u16 reg); int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf, int len); int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len); -int em28xx_set_audio_source(struct em28xx *dev); int em28xx_audio_analog_set(struct em28xx *dev); int em28xx_colorlevels_set_default(struct em28xx *dev); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html