aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2001-09-21 06:45:35 +0000
committerWarner Losh <imp@FreeBSD.org>2001-09-21 06:45:35 +0000
commit2d45d0504cfe11ecbcd1072c3e12d302df41ba8f (patch)
treec1016c73a052793c775b8a011a27cbedfa66ac9b
parent9789c757b9c9bcce1a0d055d6939e4a87bd5cb55 (diff)
Notes
-rw-r--r--sys/pccard/pcic_pci.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 1d2b21219484..16d032423895 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -1144,19 +1144,18 @@ pcic_pci_attach(device_t dev)
&sc->iorid, 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
if (sc->iores == NULL)
return (ENOMEM);
- sp->bst = rman_get_bustag(sc->iores);
- sp->bsh = rman_get_bushandle(sc->iores);
- sp->controller = PCIC_PD672X;
- sp->revision = 0;
sc->flags = PCIC_PD_POWER;
itm = pcic_pci_lookup(device_id, &pcic_pci_devs[0]);
for (i = 0; i < 2; i++) {
+ sp[i].bst = rman_get_bustag(sc->iores);
+ sp[i].bsh = rman_get_bushandle(sc->iores);
+ sp[i].sc = sc;
+ sp[i].revision = 0;
sp[i].getb = pcic_getb_io;
sp[i].putb = pcic_putb_io;
sp[i].offset = i * PCIC_SLOT_SIZE;
sp[i].controller = PCIC_PD672X;
- printf("ID is 0x%x\n", sp[i].getb(sp, PCIC_ID_REV));
- if ((sp[i].getb(sp, PCIC_ID_REV) & 0xc0) == 0x80)
+ if ((sp[i].getb(&sp[i], PCIC_ID_REV) & 0xc0) == 0x80)
sp[i].slt = (struct slot *) 1;
}
/*