diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-10 09:34:35 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-10 09:34:35 -0300 |
commit | 042fd0f8605186f16b116dc72310b4b4c86b5669 (patch) | |
tree | f00f58cc51ed18cfbdd356afc4430f438cd67c0e /linux/drivers/media/video/em28xx/em28xx-audio.c | |
parent | 15d2536093622fb5634677282a682baeadd6146f (diff) | |
download | mediapointer-dvb-s2-042fd0f8605186f16b116dc72310b4b4c86b5669.tar.gz mediapointer-dvb-s2-042fd0f8605186f16b116dc72310b4b4c86b5669.tar.bz2 |
From: Devin Heitmueller <devin.heitmueller@gmail.com>
Ensure em28xx extensions only get run against devs that support them
em28xx-audio.c
em28xx-dvb.c
- Em28xx extensions should ensure they are being only loaded against devices
that support them. Deals with case where there are multiple em28xx
devices, some of which have DVB (or ALSA) support and some do not.
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
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 | 12 |
1 files changed, 12 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..076a49dc0 100644 --- a/linux/drivers/media/video/em28xx/em28xx-audio.c +++ b/linux/drivers/media/video/em28xx/em28xx-audio.c @@ -486,6 +486,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 +535,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); |