Re: [Alsa-devel] [PATCH] alsa: correct nonsensical sysfs device symlinks

xiphmont
2007-01-25T18:34:22Z

On 1/25/07, Takashi Iwai <tiwai@suse.de> wrote:

> The problem with your patch is that it breaks the structure newly
> introduced. In the new tree, card* contains the whole belonging
> devices, and each device points to the one in the card object.
> Passing dev->parent there cuts the relation between the card object
> and each device.
>
> That's why my patch rules out setting card->dev with ifdef
> CONFIG_SYSFS_DEPRECATED. As fallback, it takes the parent device to
> build the old style tree.
>
> > Having just checked a 2.6.18 machine, none of the device symlinks
> > point to card* objects; thay all point to /sys/devices/....
>
> Yes, it's a new stuff.

[This does beg the question: Does the benefit of this complete
restructuring in a subminor release of an allegedly stable kernel
outweigh the fact that it breaks all audio for any user running a
gnome desktop?]

OK, so my patch should be passing card->parent or dev->parent only in
the case that CONFIG_SYSFS_DEPRECATED is set, and leaving the call the
way it was previously in the case CONFIG_SYSFS_DEPRECATED is not set.
Essentially, ifdef/else both cases?

Is this also going to have to be the case for every other class type
that converts from class_device_create to device_create?

Monty

>
>
> Takashi
>