aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-oss.c
diff options
context:
space:
mode:
authorRicardo Cerqueira <v4l@cerqueira.org>2005-12-20 15:26:26 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-12-22 04:55:06 -0500
commit7bb9529602f8bb41a92275825b808a42ed33e5be (patch)
treed719928ae348342b47e50578155ef51f8e85fae3 /drivers/media/video/saa7134/saa7134-oss.c
parentd5ea4e26602fa7f5141872f2c17a862f1974a73f (diff)
V4L/DVB (3200): Fix saa7134 ALSA/OSS collisions
- When ALSA or OSS are loaded, check if the other is present Fixed hotplug notifiers cleanup on module removal - The saa7134 DMA sound modules now have their own Kconfig entries, and if built statically enforce exclusivity - SND_PCM_OSS isn't necessary for the OSS driver Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-oss.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-oss.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c
index c450d57b2949..8badd2a9cb2f 100644
--- a/drivers/media/video/saa7134/saa7134-oss.c
+++ b/drivers/media/video/saa7134/saa7134-oss.c
@@ -959,8 +959,17 @@ static int saa7134_oss_init(void)
959 struct saa7134_dev *dev = NULL; 959 struct saa7134_dev *dev = NULL;
960 struct list_head *list; 960 struct list_head *list;
961 961
962 if (!dmasound_init && !dmasound_exit) {
963 dmasound_init = oss_device_init;
964 dmasound_exit = oss_device_exit;
965 } else {
966 printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n");
967 return -EBUSY;
968 }
969
962 printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); 970 printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n");
963 971
972
964 list_for_each(list,&saa7134_devlist) { 973 list_for_each(list,&saa7134_devlist) {
965 dev = list_entry(list, struct saa7134_dev, devlist); 974 dev = list_entry(list, struct saa7134_dev, devlist);
966 if (dev->dmasound.priv_data == NULL) { 975 if (dev->dmasound.priv_data == NULL) {
@@ -974,9 +983,6 @@ static int saa7134_oss_init(void)
974 if (dev == NULL) 983 if (dev == NULL)
975 printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); 984 printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n");
976 985
977 dmasound_init = oss_device_init;
978 dmasound_exit = oss_device_exit;
979
980 return 0; 986 return 0;
981 987
982} 988}
@@ -997,6 +1003,9 @@ static void saa7134_oss_exit(void)
997 1003
998 } 1004 }
999 1005
1006 dmasound_init = NULL;
1007 dmasound_exit = NULL;
1008
1000 printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); 1009 printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n");
1001 1010
1002 return; 1011 return;