[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070126180457.GA29543@kroah.com>
Date: Fri, 26 Jan 2007 10:04:57 -0800
From: Greg KH <greg@...ah.com>
To: Takashi Iwai <tiwai@...e.de>
Cc: xiphmont@...h.org, Pierre Ossman <drzeus@...eus.cx>,
fedora-desktop-list@...hat.com, alsa-devel@...a-project.org,
jrb@...hat.com, linux-kernel@...r.kernel.org, mclasen@...hat.com,
Lennart Poettering <lennart@...ttering.net>, perex@...e.cz
Subject: Re: [Alsa-devel] [PATCH] alsa: correct nonsensical sysfs device symlinks
On Fri, Jan 26, 2007 at 12:40:31PM +0100, Takashi Iwai wrote:
> At Fri, 26 Jan 2007 05:53:36 -0500,
> xiphmont@...h.org wrote:
> >
> > On 1/25/07, Greg KH <greg@...ah.com> wrote:
> >
> > > Is there anything else left to fix?
> >
> > Once that testing is done, no. But don't trust the two patches I sent
> > yet, I'll resumbit the patch resulting from more thorough testing in a
> > few hours (much thanks to Takashi for giving me the parent device
> > feedback I was trolling for).
>
> After rechecking the current code regarding this sysfs change at last
> night, I found out that it's more broken for some devices like
> sound/arm/*. They refer to card->dev to obtain the device for memory
> allocation, etc, and passing card* object will screw them up.
>
> The below is my current fix. Hoepfully all evils got away now... and
> thanks for Monty for heading up this issue!
>
>
> Takashi
>
> ====
> [PATCH] ALSA: Fix sysfs breakage
>
> The recent change for a new sysfs tree with card* object breaks the
> /sys/class/sound tree if CONFIG_SYSFS_DEPRECATED is enabled.
> The device in each entry doesn't point the correct device object:
>
> /sys/class/sound
> ...
> |-- pcmC0D0c
> | |-- dev
> | |-- device -> ../../../class/sound/card0
> | |-- pcm_class
> | |-- power
> | | `-- wakeup
> | |-- subsystem -> ../../../class/sound
> | `-- uevent
>
> Also, this change breaks some drivers (like sound/arm/*) referring
> card->dev directly to obtain the device object for memory handling.
>
> This patch reverts the semantics of card->dev to the former version,
> which points to a real device object. The card* object is stored in a
> new card->card_dev field, instead. The device parent is chosen either
> card->dev or card->card_dev according to CONFIG_SYSFS_DEPRECATED to
> keep the tree compatibility.
> Also, card* isn't created if CONFIG_SYSFS_DEPRECATED is enabled. The
> reason of card* object is a root of all beloing devices, and it makes
> little sense if each sound device points to the real device object
> directly.
>
> Signed-off-by: Takashi Iwai <tiwai@...e.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
Thanks for working on tracking this down, sorry I forgot all about this
when doing this original conversion.
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists