patch-2.4.0-test5 linux/drivers/isdn/avmb1/t1pci.c
Next file: linux/drivers/isdn/isdn_tty.c
Previous file: linux/drivers/isdn/avmb1/kcapi.c
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Mon Jul 24 18:48:49 2000
- Orig file:
v2.4.0-test4/linux/drivers/isdn/avmb1/t1pci.c
- Orig date:
Mon Jul 10 16:47:23 2000
diff -u --recursive --new-file v2.4.0-test4/linux/drivers/isdn/avmb1/t1pci.c linux/drivers/isdn/avmb1/t1pci.c
@@ -1,11 +1,15 @@
/*
- * $Id: t1pci.c,v 1.9 2000/05/19 15:43:22 calle Exp $
+ * $Id: t1pci.c,v 1.10 2000/07/20 10:21:21 calle Exp $
*
* Module for AVM T1 PCI-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: t1pci.c,v $
+ * Revision 1.10 2000/07/20 10:21:21 calle
+ * Bugfix: driver will not be unregistered, if not cards were detected.
+ * this result in an oops in kcapi.c
+ *
* Revision 1.9 2000/05/19 15:43:22 calle
* added calls to pci_device_start().
*
@@ -62,7 +66,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.9 $";
+static char *revision = "$Revision: 1.10 $";
#undef CONFIG_T1PCI_DEBUG
#undef CONFIG_T1PCI_POLLDEBUG
@@ -322,9 +326,7 @@
printk(KERN_ERR
"%s: failed to enable AVM-T1-PCI at i/o %#x, irq %d, mem %#x err=%d\n",
driver->name, param.port, param.irq, param.membase, retval);
-#ifdef MODULE
- cleanup_module();
-#endif
+ detach_capi_driver(&t1pci_driver);
MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -337,9 +339,7 @@
printk(KERN_ERR
"%s: no AVM-T1-PCI at i/o %#x, irq %d detected, mem %#x\n",
driver->name, param.port, param.irq, param.membase);
-#ifdef MODULE
- cleanup_module();
-#endif
+ detach_capi_driver(&t1pci_driver);
MOD_DEC_USE_COUNT;
return retval;
}
@@ -352,6 +352,7 @@
return 0;
}
printk(KERN_ERR "%s: NO T1-PCI card detected\n", driver->name);
+ detach_capi_driver(&t1pci_driver);
MOD_DEC_USE_COUNT;
return -ESRCH;
#else
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)