summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-26 11:00:08 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-26 11:00:08 +0000
commit6f0ec141ea0f1187469b83f33551c527128c3eae (patch)
tree226b8068b89c5c1ea2a52ad50a33ce49fc78883e
parent548397e999c318d25451bd1d3b09d6d897a620a7 (diff)
Some more KNF
-rw-r--r--sys/dev/isa/pcmcia_pcic.c95
1 files changed, 48 insertions, 47 deletions
diff --git a/sys/dev/isa/pcmcia_pcic.c b/sys/dev/isa/pcmcia_pcic.c
index de3fbd0fc21..48fedcf166a 100644
--- a/sys/dev/isa/pcmcia_pcic.c
+++ b/sys/dev/isa/pcmcia_pcic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia_pcic.c,v 1.12 1997/01/26 10:02:07 niklas Exp $ */
+/* $OpenBSD: pcmcia_pcic.c,v 1.13 1997/01/26 11:00:07 niklas Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -283,55 +283,56 @@ pcic_probe(parent, self, aux)
pcic->sc_adapter.nslots = 0;
maxslot = 2;
for (i = j = 0; i < maxslot; i++) {
- pcic->slot[j].reg_off = 0x80 * pia->pia_ctlr + 0x40 * i;
- pcic->slot[j].chip = pcic;
+ pcic->slot[j].reg_off = 0x80 * pia->pia_ctlr + 0x40 * i;
+ pcic->slot[j].chip = pcic;
- chip_inf = pcic_rd(&pcic->slot[j], PCIC_ID_REV);
- if (PDEBUG(PCDCONF)) {
- printf("pcic_probe read info %x\n", chip_inf);
- delay(2000000);
- }
- if (!first && ochip_inf != chip_inf)
- continue; /* don't attach, it's different */
- ochip_inf = chip_inf;
- switch (chip_inf) {
- case PCIC_INTEL0:
- pcic->chip_inf = PCMICA_CHIP_82365_0;
- goto ok;
- case PCIC_INTEL1:
- pcic->chip_inf = PCMICA_CHIP_82365_1;
- goto ok;
- case PCIC_IBM1:
- pcic->chip_inf = PCMICA_CHIP_IBM_1;
- goto ok;
- case PCIC_146FC6:
- pcic->chip_inf = PCMICA_CHIP_146FC6;
- maxslot = 4;
- goto ok;
- case PCIC_146FC7:
- pcic->chip_inf = PCMICA_CHIP_146FC7;
- maxslot = 4;
- goto ok;
- case PCIC_IBM2:
- pcic->chip_inf = PCMICA_CHIP_IBM_2;
- ok:
- if (first) {
- pcic->sc_adapter.adapter_softc = (void *)pcic;
- pcic->sc_adapter.chip_link = &pcic_funcs;
- pcic->sc_adapter.bus_link = &pcmcia_isa_link;
- pcicm->sc_ctlrs[pia->pia_ctlr] = pcic;
- pcicm->sc_slavestate[pia->pia_ctlr] = SLAVE_CONFIGURED;
- first = 0;
- }
- pcic->sc_adapter.nslots++;
- j++;
- default:
+ chip_inf = pcic_rd(&pcic->slot[j], PCIC_ID_REV);
if (PDEBUG(PCDCONF)) {
- printf("found ID %x at pcic%d position\n",
- chip_inf & 0xff, pcic->sc_dev.dv_unit);
+ printf("pcic_probe read info %x\n", chip_inf);
+ delay(2000000);
+ }
+ if (!first && ochip_inf != chip_inf)
+ continue; /* don't attach, it's different */
+ ochip_inf = chip_inf;
+ switch (chip_inf) {
+ case PCIC_INTEL0:
+ pcic->chip_inf = PCMICA_CHIP_82365_0;
+ goto ok;
+ case PCIC_INTEL1:
+ pcic->chip_inf = PCMICA_CHIP_82365_1;
+ goto ok;
+ case PCIC_IBM1:
+ pcic->chip_inf = PCMICA_CHIP_IBM_1;
+ goto ok;
+ case PCIC_146FC6:
+ pcic->chip_inf = PCMICA_CHIP_146FC6;
+ maxslot = 4;
+ goto ok;
+ case PCIC_146FC7:
+ pcic->chip_inf = PCMICA_CHIP_146FC7;
+ maxslot = 4;
+ goto ok;
+ case PCIC_IBM2:
+ pcic->chip_inf = PCMICA_CHIP_IBM_2;
+ok:
+ if (first) {
+ pcic->sc_adapter.adapter_softc = (void *)pcic;
+ pcic->sc_adapter.chip_link = &pcic_funcs;
+ pcic->sc_adapter.bus_link = &pcmcia_isa_link;
+ pcicm->sc_ctlrs[pia->pia_ctlr] = pcic;
+ pcicm->sc_slavestate[pia->pia_ctlr] =
+ SLAVE_CONFIGURED;
+ first = 0;
+ }
+ pcic->sc_adapter.nslots++;
+ j++;
+ default:
+ if (PDEBUG(PCDCONF)) {
+ printf("found ID %x at pcic%d position\n",
+ chip_inf & 0xff, pcic->sc_dev.dv_unit);
+ }
+ continue;
}
- continue;
- }
}
if (pcic->sc_adapter.nslots != 0) {
if (bus_space_map(pia->pia_memt, pia->pia_maddr,