From: Tejun Heo <teheo@suse.de>
To: Takashi Iwai <tiwai@suse.de>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Greg KH <greg@kroah.com>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
Colin Guthrie <cguthrie@mandriva.org>,
Al Viro <viro@ftp.linux.org.uk>
Subject: [PATCH 2/3] sound: request char-major-* module aliases for missing OSS devices
Date: Thu, 06 Aug 2009 18:13:58 +0900 [thread overview]
Message-ID: <4A7A9ED6.8010400@suse.de> (raw)
In-Reply-To: <4A7A9EB3.4010302@kernel.org>
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: Takashi Iwai <tiwai@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
---
sound/sound_core.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Index: work/sound/sound_core.c
===================================================================
--- work.orig/sound/sound_core.c
+++ work/sound/sound_core.c
@@ -541,6 +541,7 @@ static int soundcore_open(struct inode *
new_fops = fops_get(s->unit_fops);
if (!new_fops) {
spin_unlock(&sound_loader_lock);
+
/*
* Please, don't change this order or code.
* For ALSA slot means soundcard and OSS emulation code
@@ -550,6 +551,17 @@ static int soundcore_open(struct inode *
*/
request_module("sound-slot-%i", unit>>4);
request_module("sound-service-%i-%i", unit>>4, chain);
+
+ /*
+ * sound-slot/service-* module aliases are scheduled
+ * for removal in favor of the standard char-major-*
+ * module aliases. For the time being, generate both
+ * the legacy and standard module aliases to ease
+ * transition.
+ */
+ if (request_module("char-major-%d-%d", SOUND_MAJOR, unit) > 0)
+ request_module("char-major-%d", SOUND_MAJOR);
+
spin_lock(&sound_loader_lock);
s = __look_for_unit(chain, unit);
if (s)
next prev parent reply other threads:[~2009-08-06 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 9:13 [PATCH 1/3] chrdev: implement __[un]register_chrdev() Tejun Heo
2009-08-06 9:13 ` Tejun Heo [this message]
2009-08-06 9:14 ` [PATCH 3/3] sound: make OSS device number claiming optional and schedule its removal Tejun Heo
2009-08-10 12:02 ` [PATCH 1/3] chrdev: implement __[un]register_chrdev() Takashi Iwai
2009-08-17 9:54 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A7A9ED6.8010400@suse.de \
--to=teheo@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cguthrie@mandriva.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.