diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-01-03 13:54:44 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-04 04:13:48 -0500 |
commit | 3e23c658833f135508127c955d40d7c9387f71dd (patch) | |
tree | 846afbfa16ad9ea004495260e28bc92224c1f610 /sound/core | |
parent | 2ad5dd8dc31137a050f205525a5cd1a4be76c3f1 (diff) |
[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')
-rw-r--r-- | sound/core/device.c | 2 | ||||
-rw-r--r-- | sound/core/sound.c | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/sound/core/device.c b/sound/core/device.c index 478264cab67e..b1cf6ec56784 100644 --- a/sound/core/device.c +++ b/sound/core/device.c | |||
@@ -193,7 +193,7 @@ int snd_device_register_all(struct snd_card *card) | |||
193 | int err; | 193 | int err; |
194 | 194 | ||
195 | snd_assert(card != NULL, return -ENXIO); | 195 | snd_assert(card != NULL, return -ENXIO); |
196 | list_for_each_prev(list, &card->devices) { | 196 | list_for_each(list, &card->devices) { |
197 | dev = snd_device(list); | 197 | dev = snd_device(list); |
198 | if (dev->state == SNDRV_DEV_BUILD && dev->ops->dev_register) { | 198 | if (dev->state == SNDRV_DEV_BUILD && dev->ops->dev_register) { |
199 | if ((err = dev->ops->dev_register(dev)) < 0) | 199 | if ((err = dev->ops->dev_register(dev)) < 0) |
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, | |||
245 | int minor; | 245 | int minor; |
246 | struct snd_minor *preg; | 246 | struct snd_minor *preg; |
247 | struct device *device = NULL; | 247 | struct device *device = NULL; |
248 | struct class_device *class_device = NULL; | ||
249 | 248 | ||
250 | snd_assert(name, return -EINVAL); | 249 | snd_assert(name, return -EINVAL); |
251 | preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL); | 250 | 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, | |||
273 | snd_minors[minor] = preg; | 272 | snd_minors[minor] = preg; |
274 | if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit) | 273 | if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit) |
275 | devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); | 274 | devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); |
276 | if (card) { | 275 | if (card) |
277 | device = card->dev; | 276 | device = card->dev; |
278 | class_device = card->parent_device; | 277 | class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name); |
279 | } | ||
280 | class_device = class_device_create(sound_class, class_device, | ||
281 | MKDEV(major, minor), device, | ||
282 | "%s", name); | ||
283 | if (type == SNDRV_DEVICE_TYPE_CONTROL) | ||
284 | card->parent_device = class_device; | ||
285 | 278 | ||
286 | up(&sound_mutex); | 279 | up(&sound_mutex); |
287 | return 0; | 280 | return 0; |