diff options
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-oss.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-oss.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 513a699a6df2..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,12 +1003,16 @@ 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; |
1003 | } | 1012 | } |
1004 | 1013 | ||
1005 | module_init(saa7134_oss_init); | 1014 | /* We initialize this late, to make sure the sound system is up and running */ |
1015 | late_initcall(saa7134_oss_init); | ||
1006 | module_exit(saa7134_oss_exit); | 1016 | module_exit(saa7134_oss_exit); |
1007 | MODULE_LICENSE("GPL"); | 1017 | MODULE_LICENSE("GPL"); |
1008 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); | 1018 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); |