linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fix to drivers/sound/mad16.c cleanup 2.4.19 [PATCH]
@ 2002-09-12  4:14 Greg Alexander
  0 siblings, 0 replies; only message in thread
From: Greg Alexander @ 2002-09-12  4:14 UTC (permalink / raw)
  To: linux-kernel

Greetings!

drivers/sound/mad16.c failed to cleanup the gameport when removing
the module, resulting in the ioport never getting freed up and
   cat /proc/ioports
causes a kernel OOPS from then on.

I am not a veteran kernel hacker but I'm pretty sure the attached
patch is sound...

This patch is against 2.4.19 but my suspicion is that it's relevant
in 2.5 as well (probably no changes).  It's not in 2.2 because the
joystick driver in that setup is completely separate from the mad16
driver.

Please email me if you have any questions/comments.  I do not
generally read lkml.

While we're on this note, anyone care to guess why my SBPCD drive
stopped working when I upgraded from 2.2.19 to 2.4.19?  It looks like
I'm passing the correct params to mad16 to initialize the cd-rom drive..
i don't want to have to go out and buy a new cd-rom so soon! :)

Thanks everybody!  - greg

p.s. isn't it about time for a feature freeze on 2.4.19?  I would
have thought after waiting so long all the details should be settling
down by now.

I hope it's alright to plain-text attach...

--- drivers/sound/mad16.c	2002/09/12 02:15:25
+++ drivers/sound/mad16.c	2002/09/12 02:19:49
@@ -1051,6 +1051,12 @@
 {
 	if (found_mpu)
 		unload_mad16_mpu(&cfg_mpu);
+	if (gameport.io) {
+		/* the gameport was initialized so we must free it up */
+		gameport_unregister_port(&gameport);
+		gameport.io = 0;
+		release_region(0x201, 1);
+	}
 	unload_mad16(&cfg);
 }
 

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

only message in thread, other threads:[~2002-09-12  4:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-12  4:14 fix to drivers/sound/mad16.c cleanup 2.4.19 [PATCH] Greg Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).