From d80f19fab89cba8a6d16193154c8ff3edab00942 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 7 Aug 2006 22:19:37 -0700 Subject: Driver core: convert sound core to use struct device Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. It also makes the struct sound_card to show up as a "real" device where all the different sound class devices are placed as childs and different card attribute files can hang off of. /sys/class/sound is still a flat directory, but the symlink targets of all devices belonging to the same card, point the the /sys/devices tree below the new card device object. Thanks to Kay for the updates to this patch. Signed-off-by: Kay Sievers Acked-by: Jaroslav Kysela Signed-off-by: Greg Kroah-Hartman --- sound/sound_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/sound_core.c') diff --git a/sound/sound_core.c b/sound/sound_core.c index 5322c50c961..8f1ced4ab34 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -170,8 +170,8 @@ static int sound_insert_unit(struct sound_unit **list, const struct file_operati else sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP); - class_device_create(sound_class, NULL, MKDEV(SOUND_MAJOR, s->unit_minor), - dev, s->name+6); + device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor), + s->name+6); return r; fail: @@ -193,7 +193,7 @@ static void sound_remove_unit(struct sound_unit **list, int unit) p = __sound_remove_unit(list, unit); spin_unlock(&sound_loader_lock); if (p) { - class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, p->unit_minor)); + device_destroy(sound_class, MKDEV(SOUND_MAJOR, p->unit_minor)); kfree(p); } } -- cgit v1.2.3