All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Krzysztof Rusocki <kszysiu@iceberg.elsat.net.pl>,
	cltien@cmedia.com.tw, linux-kernel@vger.kernel.org
Subject: [2.4 patch] cmpci oops on rmmod + fix
Date: Sat, 17 Jul 2004 22:07:04 +0200	[thread overview]
Message-ID: <20040717200704.GD14733@fs.tum.de> (raw)

Below is a patch originally sent against 2.6 by
Krzysztof Rusocki <kszysiu@iceberg.elsat.net.pl> (and already included 
in 2.6.8-rc1).

His explanation of the patch was:

<--  snip  -->

The cmpci driver included in Linux 2.6.7 causes an oops on rmmod,
I believe cm_remove should be marked __devexit rather than __devinit.

<--  snip  -->


This is an obvious bug, and below is my backport of his fix to 2.4 .
While I was editing struct cm_driver, I've also converted it to C99 
initializers (as already done in 2.6).


Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

--- linux-2.4.27-rc3-full/drivers/sound/cmpci.c.old	2004-07-17 21:56:28.000000000 +0200
+++ linux-2.4.27-rc3-full/drivers/sound/cmpci.c	2004-07-17 21:57:22.000000000 +0200
@@ -3595,7 +3595,7 @@
 MODULE_DESCRIPTION("CM8x38 Audio Driver");
 MODULE_LICENSE("GPL");
 
-static void __devinit cm_remove(struct pci_dev *dev)
+static void __devexit cm_remove(struct pci_dev *dev)
 {
 	struct cm_state *s = pci_get_drvdata(dev);
 
@@ -3643,10 +3643,10 @@
 MODULE_DEVICE_TABLE(pci, id_table);
 
 static struct pci_driver cm_driver = {
-       name: "cmpci",
-       id_table: id_table,
-       probe: cm_probe,
-       remove: cm_remove
+	.name		= "cmpci",
+	.id_table	= id_table,
+	.probe		= cm_probe,
+	.remove		= __devexit_p(cm_remove)
 };
  
 static int __init init_cmpci(void)


             reply	other threads:[~2004-07-17 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-17 20:07 Adrian Bunk [this message]
2004-07-20 14:52 ` [2.4 patch] cmpci oops on rmmod + fix Marcelo Tosatti

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=20040717200704.GD14733@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=cltien@cmedia.com.tw \
    --cc=kszysiu@iceberg.elsat.net.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.