Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / sound / oss / soundcard.c
index de91c90..d33bb46 100644 (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, NULL,
+                                   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, NULL,
+                                           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)));
                }
        }
        
@@ -682,8 +681,7 @@ static void do_sequencer_timer(unsigned long dummy)
 }
 
 
-static struct timer_list seq_timer =
-               TIMER_INITIALIZER(do_sequencer_timer, 0, 0);
+static DEFINE_TIMER(seq_timer, do_sequencer_timer, 0, 0);
 
 void request_sound_timer(int count)
 {