patch-2.4.0-test5 linux/drivers/isdn/avmb1/c4.c
Next file: linux/drivers/isdn/avmb1/capi.c
Previous file: linux/drivers/isdn/avmb1/b1pcmcia.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/c4.c
- Orig date:
Mon Jul 10 16:47:23 2000
diff -u --recursive --new-file v2.4.0-test4/linux/drivers/isdn/avmb1/c4.c linux/drivers/isdn/avmb1/c4.c
@@ -1,11 +1,15 @@
/*
- * $Id: c4.c,v 1.12 2000/06/19 16:51:53 keil Exp $
+ * $Id: c4.c,v 1.13 2000/07/20 10:21:21 calle Exp $
*
* Module for AVM C4 card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: c4.c,v $
+ * Revision 1.13 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.12 2000/06/19 16:51:53 keil
* don't free skb in irq context
*
@@ -67,7 +71,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.12 $";
+static char *revision = "$Revision: 1.13 $";
#undef CONFIG_C4_DEBUG
#undef CONFIG_C4_POLLDEBUG
@@ -1357,9 +1361,7 @@
printk(KERN_ERR
"%s: failed to enable AVM-C4 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(driver);
MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -1372,9 +1374,7 @@
printk(KERN_ERR
"%s: no AVM-C4 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(driver);
MOD_DEC_USE_COUNT;
return retval;
}
@@ -1387,6 +1387,7 @@
return 0;
}
printk(KERN_ERR "%s: NO C4 card detected\n", driver->name);
+ detach_capi_driver(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)