summaryrefslogtreecommitdiffstats
path: root/sys/pccard/mecia.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-05-19 06:17:37 +0000
committerimp <imp@FreeBSD.org>2001-05-19 06:17:37 +0000
commit1a0ef36b0146047ccbfb239506991b84bb1e62e3 (patch)
treec48a3b884e3a07e81a19c5e9da9dcb2ba9540e52 /sys/pccard/mecia.c
parent9566430dfac0c03278e276bf249f5d674447e478 (diff)
downloadFreeBSD-src-1a0ef36b0146047ccbfb239506991b84bb1e62e3.zip
FreeBSD-src-1a0ef36b0146047ccbfb239506991b84bb1e62e3.tar.gz
Initialize cinfo structure at compile time rather than run time since
they are now constant.
Diffstat (limited to 'sys/pccard/mecia.c')
-rw-r--r--sys/pccard/mecia.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/sys/pccard/mecia.c b/sys/pccard/mecia.c
index 394990a..76669c8 100644
--- a/sys/pccard/mecia.c
+++ b/sys/pccard/mecia.c
@@ -82,7 +82,22 @@ struct mecia_slot {
u_char last_reg1; /* Last value of change reg */
};
-static struct slot_ctrl mecia_cinfo;
+static struct slot_ctrl mecia_cinfo = {
+ mecia_mapirq,
+ mecia_memory,
+ mecia_io,
+ mecia_reset,
+ mecia_disable,
+ mecia_power,
+ mecia_ioctl,
+ mecia_resume,
+ 1,
+#if 0
+ 1
+#else
+ 2 /* Fake for UE2212 LAN card */
+#endif
+};
static int validunits = 0;
@@ -100,23 +115,6 @@ mecia_probe(device_t dev)
if (isa_get_logicalid(dev)) /* skip PnP probes */
return (ENXIO);
- /*
- * Initialise controller information structure.
- */
- mecia_cinfo.ioctl = mecia_ioctl;
- mecia_cinfo.mapmem = mecia_memory;
- mecia_cinfo.mapio = mecia_io;
- mecia_cinfo.power = mecia_power;
- mecia_cinfo.mapirq = mecia_mapirq;
- mecia_cinfo.reset = mecia_reset;
- mecia_cinfo.disable = mecia_disable;
- mecia_cinfo.resume = mecia_resume;
- mecia_cinfo.maxmem = 1;
-#if 0
- mecia_cinfo.maxio = 1;
-#else
- mecia_cinfo.maxio = 2; /* fake for UE2212 LAN card */
-#endif
if (inb(MECIA_REG0) != 0xff) {
validslots++;
/* XXX need to allocated the port resources */
OpenPOWER on IntegriCloud