mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mpu401 bugfix
@ 2000-11-11 22:39 Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2000-11-11 22:39 UTC (permalink / raw)
  To: linux-kernel, torvalds

[-- Attachment #1: Type: TEXT/PLAIN, Size: 197 bytes --]


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
<bkz@linux-ide.org>

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1707 bytes --]

--- 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 */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-11 22:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-11 22:39 [PATCH] mpu401 bugfix Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®