Some mpu401 functions are used in many sound drivers thus they can't be
marked __init. This patch should allow using these drivers as modules...
 
--
Bartlomiej Zolnierkiewicz
<[EMAIL PROTECTED]>
--- linux-240t11p2/drivers/sound/mpu401.c       Tue Oct  3 00:17:48 2000
+++ linux/drivers/sound/mpu401.c        Fri Nov 10 21:34:28 2000
@@ -13,6 +13,7 @@
  *
  * Thomas Sailer       ioctl code reworked (vmalloc/vfree removed)
  * Alan Cox            modularisation, use normal request_irq, use dev_id
+ * Bartlomiej Zolnierkiewicz   removed some __init to allow using many drivers
  */
 
 #include <linux/module.h>
@@ -908,7 +909,7 @@
 
 static struct midi_operations mpu401_midi_operations[MAX_MIDI_DEV];
 
-static void __init mpu401_chk_version(int n, struct mpu_config *devc)
+static void mpu401_chk_version(int n, struct mpu_config *devc)
 {
        int tmp;
        unsigned long flags;
@@ -939,7 +940,7 @@
        restore_flags(flags);
 }
 
-void __init attach_mpu401(struct address_info *hw_config, struct module *owner)
+void attach_mpu401(struct address_info *hw_config, struct module *owner)
 {
        unsigned long flags;
        char revision_char;
@@ -1166,7 +1167,7 @@
 
 }
 
-int __init probe_mpu401(struct address_info *hw_config)
+int probe_mpu401(struct address_info *hw_config)
 {
        int ok = 0;
        struct mpu_config tmp_devc;
@@ -1662,7 +1663,7 @@
        }
 }
 
-static int __init mpu_timer_init(int midi_dev)
+static int mpu_timer_init(int midi_dev)
 {
        struct mpu_config *devc;
        int n;
@@ -1724,7 +1725,7 @@
 MODULE_PARM(irq, "i");
 MODULE_PARM(io, "i");
 
-int init_mpu401(void)
+int __init init_mpu401(void)
 {
        /* Can be loaded either for module use or to provide functions
           to others */
@@ -1739,7 +1740,7 @@
        return 0;
 }
 
-void cleanup_mpu401(void)
+void __exit cleanup_mpu401(void)
 {
        if (io != -1 && irq != -1) {
                /* Check for use by, for example, sscape driver */

Reply via email to