2.4 double PCI unregistration with pcigame
PATCH 1/1 2.4 double PCI unregistration with pcigame
pcigame.c calls pci_unregister_driver() a second time when it is unloaded without finding any devices.
Signature · 4 lines
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtIndex: 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
char/joystick/pcigame.c +1 -1
@@ -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 ; }
Quoted 2 lines · Herbert Xu
pcigame.ccallspci_unregister_driver()a second time when it is unloaded without finding any devices.
I think the proper solution would be:
char/joystick/pcigame.c 1 Dec 2002 02:32:08 -0000 renamed from char/joystick/pcigame.c 28 Nov 2002 23:53:12 -0000 1.1.1.7 +0 -0
@@ -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);
}
Quoted 22 lines
Signature · 10 lines
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <[email protected]> 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.cchar/joystick/pcigame.c +1
-1@@ -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 ; }
Signature · 2 lines
Vojtech Pavlik SuSE Labs
Quoted 2 lines · Vojtech Pavlik
I think the proper solution would be:
This wouldn't work since trident.o requires pcigame.o to work even though the latter may not discover any devices on its own. That's why that comment is there.
Quoted 13 lines
diff -u -r1.1.1.7
pcigame.cchar/joystick/pcigame.c 1 Dec 2002 02:32:08 -0000 renamed from char/joystick/pcigame.c 28 Nov 2002 23:53:12 -0000 1.1.1.7 +1
-3@@ -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); }
Signature · 4 lines
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 7 lines · Herbert Xu
Quoted 2 lines · Vojtech Pavlik
I think the proper solution would be:
This wouldn't work since trident.o requires pcigame.o to work even though the latter may not discover any devices on its own. That's why that comment is there.
Ok, I agree. Fortunately this mess isn't in 2.5 ...
Quoted 18 lines
Quoted 13 lines
diff -u -r1.1.1.7
pcigame.cchar/joystick/pcigame.c 1 Dec 2002 02:32:08 -0000 renamed from char/joystick/pcigame.c 28 Nov 2002 23:53:12 -0000 1.1.1.7 +1
-3@@ -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); }Signature · 4 lines
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Signature · 2 lines
Vojtech Pavlik SuSE Labs