aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/soundcard.c
diff options
context:
space:
mode:
authorgregkh@suse.de <gregkh@suse.de>2005-03-23 12:51:41 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:07 -0400
commit619e666b7e9d2b0545ab60a9c824ae5f77c20c3b (patch)
treea2c6d9bb6b8f66fdda8cc6cd8422f062e557922d /sound/oss/soundcard.c
parent8561b10f6e7ef0a085709ffc844f74130a067abe (diff)
[PATCH] class: convert sound/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound/oss/soundcard.c')
-rw-r--r--sound/oss/soundcard.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index de91c90a0112..a686be936aff 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -73,7 +73,7 @@ static char dma_alloc_map[MAX_DMA_CHANNELS];
73 73
74 74
75unsigned long seq_time = 0; /* Time for /dev/sequencer */ 75unsigned long seq_time = 0; /* Time for /dev/sequencer */
76extern struct class_simple *sound_class; 76extern struct class *sound_class;
77 77
78/* 78/*
79 * Table for configurable mixer volume handling 79 * Table for configurable mixer volume handling
@@ -567,9 +567,9 @@ static int __init oss_init(void)
567 devfs_mk_cdev(MKDEV(SOUND_MAJOR, dev_list[i].minor), 567 devfs_mk_cdev(MKDEV(SOUND_MAJOR, dev_list[i].minor),
568 S_IFCHR | dev_list[i].mode, 568 S_IFCHR | dev_list[i].mode,
569 "sound/%s", dev_list[i].name); 569 "sound/%s", dev_list[i].name);
570 class_simple_device_add(sound_class, 570 class_device_create(sound_class,
571 MKDEV(SOUND_MAJOR, dev_list[i].minor), 571 MKDEV(SOUND_MAJOR, dev_list[i].minor),
572 NULL, "%s", dev_list[i].name); 572 NULL, "%s", dev_list[i].name);
573 573
574 if (!dev_list[i].num) 574 if (!dev_list[i].num)
575 continue; 575 continue;
@@ -579,10 +579,9 @@ static int __init oss_init(void)
579 dev_list[i].minor + (j*0x10)), 579 dev_list[i].minor + (j*0x10)),
580 S_IFCHR | dev_list[i].mode, 580 S_IFCHR | dev_list[i].mode,
581 "sound/%s%d", dev_list[i].name, j); 581 "sound/%s%d", dev_list[i].name, j);
582 class_simple_device_add(sound_class, 582 class_device_create(sound_class,
583 MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)), 583 MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)),
584 NULL, 584 NULL, "%s%d", dev_list[i].name, j);
585 "%s%d", dev_list[i].name, j);
586 } 585 }
587 } 586 }
588 587
@@ -598,12 +597,12 @@ static void __exit oss_cleanup(void)
598 597
599 for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { 598 for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
600 devfs_remove("sound/%s", dev_list[i].name); 599 devfs_remove("sound/%s", dev_list[i].name);
601 class_simple_device_remove(MKDEV(SOUND_MAJOR, dev_list[i].minor)); 600 class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
602 if (!dev_list[i].num) 601 if (!dev_list[i].num)
603 continue; 602 continue;
604 for (j = 1; j < *dev_list[i].num; j++) { 603 for (j = 1; j < *dev_list[i].num; j++) {
605 devfs_remove("sound/%s%d", dev_list[i].name, j); 604 devfs_remove("sound/%s%d", dev_list[i].name, j);
606 class_simple_device_remove(MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10))); 605 class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
607 } 606 }
608 } 607 }
609 608