summaryrefslogtreecommitdiffstats
path: root/sound/core/sound.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-01-03 19:54:44 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-04 10:13:48 +0100
commit3e23c658833f135508127c955d40d7c9387f71dd (patch)
tree846afbfa16ad9ea004495260e28bc92224c1f610 /sound/core/sound.c
parent2ad5dd8dc31137a050f205525a5cd1a4be76c3f1 (diff)
downloadlinux-3e23c658833f135508127c955d40d7c9387f71dd.tar.bz2
[ALSA] Revert the nested-device patch
Modules: ALSA Core Revert the nested-device patch to keep the compatibility with the current HAL configuration. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/sound.c')
-rw-r--r--sound/core/sound.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 2f6108deb211..a8eda02bcf1c 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -245,7 +245,6 @@ int snd_register_device(int type, struct snd_card *card, int dev,
int minor;
struct snd_minor *preg;
struct device *device = NULL;
- struct class_device *class_device = NULL;
snd_assert(name, return -EINVAL);
preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
@@ -273,15 +272,9 @@ int snd_register_device(int type, struct snd_card *card, int dev,
snd_minors[minor] = preg;
if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit)
devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name);
- if (card) {
+ if (card)
device = card->dev;
- class_device = card->parent_device;
- }
- class_device = class_device_create(sound_class, class_device,
- MKDEV(major, minor), device,
- "%s", name);
- if (type == SNDRV_DEVICE_TYPE_CONTROL)
- card->parent_device = class_device;
+ class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name);
up(&sound_mutex);
return 0;