android_kernel_xiaomi_sm8350/sound
Takashi Iwai 7d2aae1e88 [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@suse.de>
Acked-by: Monty Montgomery <xiphmont@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-29 14:32:53 -08:00
..
aoa [ALSA] sound: Don't include i2c-dev.h 2006-12-20 08:55:32 +01:00
arm [PATCH] make 1-bit bitfields unsigned 2006-12-07 08:39:38 -08:00
core [PATCH] ALSA: Fix sysfs breakage 2007-01-29 14:32:53 -08:00
drivers [PATCH] remove config ordering/dependency between ucb1400-ts and sound subsystem 2006-12-12 10:43:21 -08:00
i2c
isa [ALSA] Remove IRQF_DISABLED for shared PCI irqs 2006-12-20 08:55:57 +01:00
mips
oss [PATCH] more work_struct fixes: tas300x sound drivers 2006-12-17 19:07:21 -08:00
parisc
pci [ALSA] _snd_cmipci_uswitch_put doesn't set zero flags 2007-01-09 09:06:18 +01:00
pcmcia
ppc
sparc [SOUND] Sparc CS4231: Use 64 for period_bytes_min 2007-01-03 18:51:54 -08:00
synth
usb [ALSA] Repair snd-usb-usx2y over OHCI 2007-01-23 09:23:36 +01:00
ac97_bus.c [PATCH] remove config ordering/dependency between ucb1400-ts and sound subsystem 2006-12-12 10:43:21 -08:00
Kconfig [PATCH] remove config ordering/dependency between ucb1400-ts and sound subsystem 2006-12-12 10:43:21 -08:00
last.c
Makefile [PATCH] remove config ordering/dependency between ucb1400-ts and sound subsystem 2006-12-12 10:43:21 -08:00
sound_core.c
sound_firmware.c [PATCH] struct path: convert sound 2006-12-08 08:28:49 -08:00