[PATCH][2.6.0-test] fix emu10k1 module oops when being removed

From: Rudo Thomas (thomr9am@ss1000.ms.mff.cuni.cz)
Date: Tue Jul 15 2003 - 10:40:47 EST


Hi.

The emu10k1 module in 2.6.0-test1 and any recent 2.5.X oopses when being
removed because some of the cleanup functions that get called from
emu10k1_remove() are incorrectly marked as __devinit.

This trivial patch solves the problem.

Linus, please apply.

Bye for now.

Rudo.

diff -u linux-2.6.0-test1-vanilla-emu10k1-not-fixed/sound/oss/emu10k1/main.c linux-2.6.0-test1-vanilla/sound/oss/emu10k1/main.c
--- linux-2.6.0-test1-vanilla-emu10k1-not-fixed/sound/oss/emu10k1/main.c 2003-07-14 05:38:46.000000000 +0200
+++ linux-2.6.0-test1-vanilla/sound/oss/emu10k1/main.c 2003-07-15 02:51:13.000000000 +0200
@@ -213,7 +213,7 @@
         return -ENODEV;
 }
 
-static void __devinit emu10k1_audio_cleanup(struct emu10k1_card *card)
+static void emu10k1_audio_cleanup(struct emu10k1_card *card)
 {
         unregister_sound_dsp(card->audio_dev1);
         unregister_sound_dsp(card->audio_dev);
@@ -298,7 +298,7 @@
         return -EIO;
 }
 
-static void __devinit emu10k1_mixer_cleanup(struct emu10k1_card *card)
+static void emu10k1_mixer_cleanup(struct emu10k1_card *card)
 {
         char s[32];
 
@@ -402,7 +402,7 @@
         return ret;
 }
 
-static void __devinit emu10k1_midi_cleanup(struct emu10k1_card *card)
+static void emu10k1_midi_cleanup(struct emu10k1_card *card)
 {
         tasklet_kill(&card->mpuout->tasklet);
         kfree(card->mpuout);
@@ -450,7 +450,7 @@
         card->emupagetable[1] = MAXPAGES - 1;
 }
 
-static void __devinit fx_cleanup(struct patch_manager *mgr)
+static void fx_cleanup(struct patch_manager *mgr)
 {
         int i;
         for(i = 0; i < mgr->current_pages; i++)
@@ -967,7 +967,7 @@
         return 0;
 }
 
-static void __devinit emu10k1_cleanup(struct emu10k1_card *card)
+static void emu10k1_cleanup(struct emu10k1_card *card)
 {
         int ch;
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 15 2003 - 22:00:58 EST