From 67c431ff57652ab9816df24a5a48a321278fa1e7 Mon Sep 17 00:00:00 2001 From: Guido van Rooij Date: Sun, 10 Jan 1999 13:00:09 +0000 Subject: [PATCH] When resuming with 2 identical cards in 2 slots, the initialisation of the second card fails. This fixes that. --- usr.sbin/pccard/pccardd/cardd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c index 377ba0fc9af9..ed4f6d2b54ef 100644 --- a/usr.sbin/pccard/pccardd/cardd.c +++ b/usr.sbin/pccard/pccardd/cardd.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] = - "$Id: cardd.c,v 1.31 1998/04/20 15:24:28 nate Exp $"; + "$Id: cardd.c,v 1.32 1998/04/20 16:24:03 nate Exp $"; #endif /* not lint */ #include @@ -279,11 +279,14 @@ assign_driver(struct card *cp) for (conf = cp->config; conf; conf = conf->next) if (conf->inuse == 0 && conf->driver->card == cp && - conf->driver->config == conf) { + conf->driver->config == conf && + conf->driver->inuse == 0) { #ifdef DEBUG logmsg("Found existing driver (%s) for %s\n", conf->driver->name, cp->manuf); #endif + conf->driver->inuse = 1; + conf->inuse = 1; return (conf); } /*