[PATCH] class: convert sound/* to use the new class api instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
gregkh@suse.de
2005-03-23 09:51:41 -08:00
committed by Greg Kroah-Hartman
parent 8561b10f6e
commit 619e666b7e
3 changed files with 17 additions and 18 deletions

View File

@@ -73,7 +73,7 @@ static char dma_alloc_map[MAX_DMA_CHANNELS];
unsigned long seq_time = 0; /* Time for /dev/sequencer */
extern struct class_simple *sound_class;
extern struct class *sound_class;
/*
* Table for configurable mixer volume handling
@@ -567,9 +567,9 @@ static int __init oss_init(void)
devfs_mk_cdev(MKDEV(SOUND_MAJOR, dev_list[i].minor),
S_IFCHR | dev_list[i].mode,
"sound/%s", dev_list[i].name);
class_simple_device_add(sound_class,
MKDEV(SOUND_MAJOR, dev_list[i].minor),
NULL, "%s", dev_list[i].name);
class_device_create(sound_class,
MKDEV(SOUND_MAJOR, dev_list[i].minor),
NULL, "%s", dev_list[i].name);
if (!dev_list[i].num)
continue;
@@ -579,10 +579,9 @@ static int __init oss_init(void)
dev_list[i].minor + (j*0x10)),
S_IFCHR | dev_list[i].mode,
"sound/%s%d", dev_list[i].name, j);
class_simple_device_add(sound_class,
MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)),
NULL,
"%s%d", dev_list[i].name, j);
class_device_create(sound_class,
MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)),
NULL, "%s%d", dev_list[i].name, j);
}
}
@@ -598,12 +597,12 @@ static void __exit oss_cleanup(void)
for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
devfs_remove("sound/%s", dev_list[i].name);
class_simple_device_remove(MKDEV(SOUND_MAJOR, dev_list[i].minor));
class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
if (!dev_list[i].num)
continue;
for (j = 1; j < *dev_list[i].num; j++) {
devfs_remove("sound/%s%d", dev_list[i].name, j);
class_simple_device_remove(MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
}
}