From: Takashi Iwai <tiwai@suse.de>
To: "Christopher \"Monty\" Montgomery" <xiphmont@gmail.com>
Cc: "Pierre Ossman" <drzeus@drzeus.cx>,
fedora-desktop-list@redhat.com, alsa-devel@alsa-project.org,
jrb@redhat.com, Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org, mclasen@redhat.com,
Lennart Poettering <lennart@poettering.net>,
perex@suse.cz
Subject: Re: [Alsa-devel] [PATCH] alsa: correct nonsensical sysfs device symlinks
Date: Thu, 25 Jan 2007 17:54:48 +0100 [thread overview]
Message-ID: <s5hfy9zujvr.wl%tiwai@suse.de> (raw)
In-Reply-To: <806dafc20701250757n3dcb38b7ma5f8423ab3de9850@mail.gmail.com>
At Thu, 25 Jan 2007 10:57:25 -0500,
Christopher "Monty" Montgomery wrote:
>
> On 1/25/07, Pierre Ossman <drzeus@drzeus.cx> wrote:
>
> > There is some option about deprecated sysfs stuff. Perhaps this is the
> > cause of your twisted tree. It's off here:
> >
> > # CONFIG_SYSFS_DEPRECATED is not set
>
> It is set. It is also set in the default config, so plently of people
> are running with a broken sysfs tree.
>
> I assume we agree that even if that's set, the tree should not be
> outright broken like it is (the compatability mode should actually be
> compatable, ie, work, right? :-) Given that, is my patch correct?
> What was there (plugging the old 'dev' arg into the new call's
> 'parent' makes no sense) is clearly wrong.
It makes sense because the meaning of card->dev was changed, too.
Now it points the "card*" object that is the root of all belonging
devices. The former card->dev is stored in card->parent.
> And it's clear my pacth is incomplete, as it doesn't correct the
> device entries for the other entries.
Well, for older systems, we shouldn't have also "card*" objects, too.
An untested patch below...
Takashi
diff -r 64671853e8e2 core/init.c
--- a/core/init.c Thu Jan 25 13:15:05 2007 +0100
+++ b/core/init.c Thu Jan 25 17:50:06 2007 +0100
@@ -503,12 +503,14 @@ int snd_card_register(struct snd_card *c
int err;
snd_assert(card != NULL, return -EINVAL);
+#ifndef CONFIG_SYSFS_DEPRECATED
if (!card->dev) {
card->dev = device_create(sound_class, card->parent, 0,
"card%i", card->number);
if (IS_ERR(card->dev))
card->dev = NULL;
}
+#endif
if ((err = snd_device_register_all(card)) < 0)
return err;
mutex_lock(&snd_card_mutex);
diff -r 64671853e8e2 core/sound.c
--- a/core/sound.c Thu Jan 25 13:15:05 2007 +0100
+++ b/core/sound.c Thu Jan 25 17:50:40 2007 +0100
@@ -241,6 +241,9 @@ int snd_register_device_for_dev(int type
int minor;
struct snd_minor *preg;
+ if (!device && !card)
+ device = card->parent;
+
snd_assert(name, return -EINVAL);
preg = kmalloc(sizeof *preg, GFP_KERNEL);
if (preg == NULL)
next prev parent reply other threads:[~2007-01-25 16:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-25 1:50 Christopher "Monty" Montgomery
2007-01-25 4:26 ` Greg KH
2007-01-25 14:11 ` Christopher "Monty" Montgomery
2007-01-25 15:15 ` Pierre Ossman
2007-01-25 15:36 ` Christopher "Monty" Montgomery
2007-01-25 15:40 ` Pierre Ossman
2007-01-25 15:57 ` Christopher "Monty" Montgomery
2007-01-25 16:54 ` Takashi Iwai [this message]
2007-01-25 17:03 ` [Alsa-devel] " Christopher "Monty" Montgomery
2007-01-25 17:30 ` xiphmont
2007-01-25 17:47 ` Takashi Iwai
2007-01-25 18:07 ` xiphmont
2007-01-25 18:23 ` Takashi Iwai
2007-01-25 18:34 ` xiphmont
2007-01-25 18:38 ` Takashi Iwai
2007-01-25 18:51 ` xiphmont
2007-01-25 19:49 ` Greg KH
2007-01-25 20:40 ` xiphmont
2007-01-25 21:59 ` Greg KH
2007-01-26 10:53 ` xiphmont
2007-01-26 11:40 ` Takashi Iwai
2007-01-26 18:04 ` Greg KH
2007-01-26 18:25 ` Takashi Iwai
2007-01-26 18:31 ` xiphmont
2007-01-26 19:06 ` Greg KH
2007-01-26 21:58 ` xiphmont
2007-01-26 18:03 ` xiphmont
2007-01-26 18:42 ` Greg KH
2007-01-25 17:48 ` Christopher "Monty" Montgomery
2007-01-25 11:27 ` Pierre Ossman
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=s5hfy9zujvr.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=drzeus@drzeus.cx \
--cc=fedora-desktop-list@redhat.com \
--cc=greg@kroah.com \
--cc=jrb@redhat.com \
--cc=lennart@poettering.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mclasen@redhat.com \
--cc=perex@suse.cz \
--cc=xiphmont@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®