diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-08 07:19:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 23:52:01 +0100 |
commit | d80f19fab89cba8a6d16193154c8ff3edab00942 (patch) | |
tree | 5d6b567a45ca4cc014bf5a1d10622c91ece2f63e /sound/sound_core.c | |
parent | Driver core: change mem class_devices to be real devices (diff) | |
download | linux-d80f19fab89cba8a6d16193154c8ff3edab00942.tar.xz linux-d80f19fab89cba8a6d16193154c8ff3edab00942.zip |
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 <kay.sievers@novell.com>
Acked-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound/sound_core.c')
-rw-r--r-- | sound/sound_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/sound_core.c b/sound/sound_core.c index 5322c50c9617..8f1ced4ab34c 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); } } |