Re: [PATCH] 2.4 double PCI unregistration with pcigame

From: Vojtech Pavlik (vojtech@suse.cz)
Date: Sun Dec 01 2002 - 05:08:08 EST


On Sun, Dec 01, 2002 at 03:40:19PM +1100, Herbert Xu wrote:

> pcigame.c calls pci_unregister_driver() a second time when it is unloaded
> without finding any devices.

I think the proper solution would be:

diff -u -r1.1.1.7 pcigame.c
--- drivers/char/joystick/pcigame.c 28 Nov 2002 23:53:12 -0000 1.1.1.7
+++ drivers/char/joystick/pcigame.c 1 Dec 2002 02:32:08 -0000

@@ -195,7 +195,7 @@

 int __init pcigame_init(void)
 {
- pci_module_init(&pcigame_driver);
- /* Needed by other modules */
- return 0;
+ return pci_module_init(&pcigame_driver);
 }

> --
> Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
> Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

> Index: drivers/char/joystick/pcigame.c
> ===================================================================
> RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/drivers/char/joystick/pcigame.c,v
> retrieving revision 1.1.1.7
> diff -u -r1.1.1.7 pcigame.c
> --- drivers/char/joystick/pcigame.c 28 Nov 2002 23:53:12 -0000 1.1.1.7
> +++ drivers/char/joystick/pcigame.c 1 Dec 2002 02:32:08 -0000
> @@ -195,7 +195,7 @@
>
> int __init pcigame_init(void)
> {
> - pci_module_init(&pcigame_driver);
> + pci_register_driver(&pcigame_driver);
> /* Needed by other modules */
> return 0;
> }

-- 
Vojtech Pavlik
SuSE Labs
-
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 : Sat Dec 07 2002 - 22:00:10 EST