public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Alexander <galexand@yossman.net>
To: linux-kernel@vger.kernel.org
Subject: fix to drivers/sound/mad16.c cleanup 2.4.19 [PATCH]
Date: Thu, 12 Sep 2002 00:14:17 -0400	[thread overview]
Message-ID: <E17pLMv-0000MT-00@localhost> (raw)

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);
 }
 

                 reply	other threads:[~2002-09-12  4:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17pLMv-0000MT-00@localhost \
    --to=galexand@yossman.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox