aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-audio.c
diff options
context:
space:
mode:
authorDevin Heitmueller <devin.heitmueller@gmail.com>2008-06-10 11:34:35 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-06-26 14:58:44 -0400
commitdf619181631217e3166bb6c7538f981e0272617f (patch)
treec35f999f9a557490a997cd57eebe403216993ca5 /drivers/media/video/em28xx/em28xx-audio.c
parent1a78db826973b9fa658d72291ec2007889e2faf7 (diff)
V4L/DVB (8017): 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 'drivers/media/video/em28xx/em28xx-audio.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index 92b2a6db4fdc..343dff0f8a04 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -415,6 +415,12 @@ static int em28xx_audio_init(struct em28xx *dev)
415 static int devnr; 415 static int devnr;
416 int ret, err; 416 int ret, err;
417 417
418 if (dev->has_audio_class) {
419 /* This device does not support the extension (in this case
420 the device is expecting the snd-usb-audio module */
421 return 0;
422 }
423
418 printk(KERN_INFO "em28xx-audio.c: probing for em28x1 " 424 printk(KERN_INFO "em28xx-audio.c: probing for em28x1 "
419 "non standard usbaudio\n"); 425 "non standard usbaudio\n");
420 printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus " 426 printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus "
@@ -458,6 +464,12 @@ static int em28xx_audio_fini(struct em28xx *dev)
458 if (dev == NULL) 464 if (dev == NULL)
459 return 0; 465 return 0;
460 466
467 if (dev->has_audio_class) {
468 /* This device does not support the extension (in this case
469 the device is expecting the snd-usb-audio module */
470 return 0;
471 }
472
461 if (dev->adev) { 473 if (dev->adev) {
462 snd_card_free(dev->adev->sndcard); 474 snd_card_free(dev->adev->sndcard);
463 kfree(dev->adev); 475 kfree(dev->adev);