summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pccard_nbk.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-05-13 01:44:27 +0000
committerimp <imp@FreeBSD.org>2001-05-13 01:44:27 +0000
commitbaa510a9095471fa1528a4c5916fa194d74e9214 (patch)
tree873787c8847fe33cc3c0cc1da3427dcea2f191ca /sys/pccard/pccard_nbk.c
parent0ed7ba54b3471331d3d3726dc8089f9fb2658d87 (diff)
downloadFreeBSD-src-baa510a9095471fa1528a4c5916fa194d74e9214.zip
FreeBSD-src-baa510a9095471fa1528a4c5916fa194d74e9214.tar.gz
o Get rid of static array of slots in pccard layer. Move this to the
softc. o Store pointers to softc in dev_t in si_drv1. o Change 'kludge version' to 'classic version' since things are getting less kludgy. o Minor code shuffling so that we probe and attach the pccard slots. o Minor style(9) changes.
Diffstat (limited to 'sys/pccard/pccard_nbk.c')
-rw-r--r--sys/pccard/pccard_nbk.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/pccard/pccard_nbk.c b/sys/pccard/pccard_nbk.c
index 34333d0..6155d86 100644
--- a/sys/pccard/pccard_nbk.c
+++ b/sys/pccard/pccard_nbk.c
@@ -108,8 +108,14 @@ pccard_compat_do_attach(device_t bus, device_t dev)
static int
pccard_probe(device_t dev)
{
- device_set_desc(dev, "PC Card bus -- kludge version");
- return 0;
+ device_set_desc(dev, "PC Card bus (classic)");
+ return (0);
+}
+
+static int
+pccard_attach(device_t dev)
+{
+ return (0);
}
static void
@@ -362,7 +368,7 @@ pccard_product_lookup(device_t dev, const struct pccard_product *tab,
static device_method_t pccard_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, pccard_probe),
- DEVMETHOD(device_attach, bus_generic_attach),
+ DEVMETHOD(device_attach, pccard_attach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, pccard_suspend),
DEVMETHOD(device_resume, pccard_resume),
@@ -398,10 +404,10 @@ static device_method_t pccard_methods[] = {
static driver_t pccard_driver = {
"pccard",
pccard_methods,
- 1, /* no softc */
+ sizeof(struct slot)
};
DRIVER_MODULE(pccard, pcic, pccard_driver, pccard_devclass, 0, 0);
-DRIVER_MODULE(pccard, pc98pcic, pccard_driver, pccard_devclass, 0, 0);
-DRIVER_MODULE(pccard, cbb, pccard_driver, pccard_devclass, 0, 0);
+DRIVER_MODULE(pccard, mecia, pccard_driver, pccard_devclass, 0, 0);
+DRIVER_MODULE(pccard, tcic, pccard_driver, pccard_devclass, 0, 0);
MODULE_VERSION(pccard, 1);
OpenPOWER on IntegriCloud