diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-15 08:25:02 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-15 08:25:02 -0300 |
commit | e192b6f88d8065aacfce581bee2f3a231156e8be (patch) | |
tree | e987468be1c649162e0a10059900a682bb62824e /linux/drivers/media/video/em28xx/em28xx-audio.c | |
parent | 905787833253b4eaa26ebe72826447c814d339d8 (diff) | |
parent | 983506b534a01a91cadea8fd8369d6f00538cd0c (diff) | |
download | mediapointer-dvb-s2-e192b6f88d8065aacfce581bee2f3a231156e8be.tar.gz mediapointer-dvb-s2-e192b6f88d8065aacfce581bee2f3a231156e8be.tar.bz2 |
merge: http://linuxtv.org/hg/~anttip/anysee/
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-audio.c')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-audio.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-audio.c b/linux/drivers/media/video/em28xx/em28xx-audio.c index 609e28e77..904973305 100644 --- a/linux/drivers/media/video/em28xx/em28xx-audio.c +++ b/linux/drivers/media/video/em28xx/em28xx-audio.c @@ -299,6 +299,12 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream *substream) dprintk("opening device and trying to acquire exclusive lock\n"); + if (!dev) { + printk(KERN_ERR "BUG: em28xx can't find device struct." + " Can't proceed with open\n"); + return -ENODEV; + } + /* Sets volume, mute, etc */ dev->mute = 0; @@ -486,6 +492,12 @@ static int em28xx_audio_init(struct em28xx *dev) static int devnr; int ret, err; + if (dev->has_audio_class) { + /* This device does not support the extension (in this case + the device is expecting the snd-usb-audio module */ + return 0; + } + printk(KERN_INFO "em28xx-audio.c: probing for em28x1 " "non standard usbaudio\n"); printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus " @@ -529,6 +541,12 @@ static int em28xx_audio_fini(struct em28xx *dev) if (dev == NULL) return 0; + if (dev->has_audio_class) { + /* This device does not support the extension (in this case + the device is expecting the snd-usb-audio module */ + return 0; + } + if (dev->adev) { snd_card_free(dev->adev->sndcard); kfree(dev->adev); |