public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bug in /drivers/char/epca.c
@ 2001-03-06 12:28 Andrey Panin
  0 siblings, 0 replies; only message in thread
From: Andrey Panin @ 2001-03-06 12:28 UTC (permalink / raw)
  To: linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 505 bytes --]


Hi all,

this patch fixes bug in Digi epca.c driver. This driver calls 
tty_register_driver() 3 times and tty_unregister_driver() 2 times. 
This bug causes hang on module unload.

Also a question: somebody knows why this driver scans PCI devices before
registering tty drivers? It makes impossible to remove panic() calls easily.

Best regards.

-- 
Andrey Panin            | Embedded systems software engineer
pazke@orbita1.ru        | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc

[-- Attachment #1.2: patch-epca --]
[-- Type: text/plain, Size: 534 bytes --]

diff -ur linux.vanilla/drivers/char/epca.c linux/drivers/char/epca.c
--- linux.vanilla/drivers/char/epca.c	Mon Mar  5 12:01:51 2001
+++ linux/drivers/char/epca.c	Tue Mar  6 13:37:58 2001
@@ -1574,7 +1574,8 @@
 	cli();
 
 	if ((tty_unregister_driver(&pc_driver)) ||  
-	    (tty_unregister_driver(&pc_callout)))
+	    (tty_unregister_driver(&pc_callout)) ||
+	    (tty_unregister_driver(&pc_info)))
 	{
 		printk(KERN_WARNING "<Error> - DIGI : cleanup_module failed to un-register tty driver\n");
 		restore_flags(flags);

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

only message in thread, other threads:[~2001-03-06 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-06 12:28 [PATCH] bug in /drivers/char/epca.c Andrey Panin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox