summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pccard.c
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1997-10-26 21:08:42 +0000
committernate <nate@FreeBSD.org>1997-10-26 21:08:42 +0000
commitfa55951ed537b4c4f68482e66fc7123eab0cf3fc (patch)
tree0439bf497279cd9e48c661b7d3e61a65cd486efb /sys/pccard/pccard.c
parentc76c50d092e899d58a0c957da71951be8e875d62 (diff)
downloadFreeBSD-src-fa55951ed537b4c4f68482e66fc7123eab0cf3fc.zip
FreeBSD-src-fa55951ed537b4c4f68482e66fc7123eab0cf3fc.tar.gz
- Instead of relying on a functional call to register PCARD-capable drivers,
use a Linker Set. Note, if a driver is loaded as an LKM if will have to use the function call, but since none of the existing drivers are loadable, this made things cleaner and boot messages nicer. Obtained from: PAO-970616
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r--sys/pccard/pccard.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index cf6f62d..549f215 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -141,13 +141,22 @@ static struct cdevsw crd_cdevsw =
* slot number accessed via the character device entries.
*/
void
-pccard_configure()
+pccard_configure(void)
{
+ struct pccard_device **drivers, *drv;
#include "pcic.h"
#if NPCIC > 0
pcic_probe();
#endif
+
+ drivers = (struct pccard_device **)pccarddrv_set.ls_items;
+ printf("Initializing PC-card drivers:");
+ while ((drv = *drivers++)) {
+ printf(" %s", drv->name);
+ pccard_add_driver(drv);
+ }
+ printf("\n");
}
/*
@@ -164,7 +173,6 @@ pccard_add_driver(struct pccard_device *drv)
printf("Driver %s already loaded\n", drv->name);
return;
}
- printf("pccard driver %s added\n", drv->name);
drv->next = drivers;
drivers = drv;
}
OpenPOWER on IntegriCloud