aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTejun Heo <teheo@suse.de>2009-08-06 05:13:58 -0400
committerTakashi Iwai <tiwai@suse.de>2009-08-10 07:59:26 -0400
commit0a848680a82e47854347cdfecbe9adf8842719e6 (patch)
tree228ab8937e348d4f8100fef73485a77f13b2d1da /sound
parent1905b1bfc0de6f69a61dc03cac0d86a04b3216bd (diff)
sound: request char-major-* module aliases for missing OSS devices
Till now missing OSS devices emitted sound-slot/service-* module alises instead of the standard char-major-* if a missing device number is opened if soundcore is loaded. The custom module aliases don't have any inherent benefit than backward compatibility. sound-slot/service-* module aliases is scheduled to be removed and to help the transition this patch makes soundcore emit the standard module alises along with the custom ones. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/sound_core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/sound_core.c b/sound/sound_core.c
index a41f8b127f49..786067c49b01 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -541,6 +541,7 @@ static int soundcore_open(struct inode *inode, struct file *file)
541 new_fops = fops_get(s->unit_fops); 541 new_fops = fops_get(s->unit_fops);
542 if (!new_fops) { 542 if (!new_fops) {
543 spin_unlock(&sound_loader_lock); 543 spin_unlock(&sound_loader_lock);
544
544 /* 545 /*
545 * Please, don't change this order or code. 546 * Please, don't change this order or code.
546 * For ALSA slot means soundcard and OSS emulation code 547 * For ALSA slot means soundcard and OSS emulation code
@@ -550,6 +551,17 @@ static int soundcore_open(struct inode *inode, struct file *file)
550 */ 551 */
551 request_module("sound-slot-%i", unit>>4); 552 request_module("sound-slot-%i", unit>>4);
552 request_module("sound-service-%i-%i", unit>>4, chain); 553 request_module("sound-service-%i-%i", unit>>4, chain);
554
555 /*
556 * sound-slot/service-* module aliases are scheduled
557 * for removal in favor of the standard char-major-*
558 * module aliases. For the time being, generate both
559 * the legacy and standard module aliases to ease
560 * transition.
561 */
562 if (request_module("char-major-%d-%d", SOUND_MAJOR, unit) > 0)
563 request_module("char-major-%d", SOUND_MAJOR);
564
553 spin_lock(&sound_loader_lock); 565 spin_lock(&sound_loader_lock);
554 s = __look_for_unit(chain, unit); 566 s = __look_for_unit(chain, unit);
555 if (s) 567 if (s)