diff options
author | imp <imp@FreeBSD.org> | 2001-05-25 18:28:49 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-05-25 18:28:49 +0000 |
commit | cfd71a8415067fdf15ffdae9dfe3b977d1945cff (patch) | |
tree | 3098ba65428f08d66966ef336d2180030034e16e /sys/pccard | |
parent | 76ca05f26f8d877cbb2daa7d37c391fa80170d43 (diff) | |
download | FreeBSD-src-cfd71a8415067fdf15ffdae9dfe3b977d1945cff.zip FreeBSD-src-cfd71a8415067fdf15ffdae9dfe3b977d1945cff.tar.gz |
Migrate from unit based to dev base. Don't save unit number, but do save
dev. Convert all uses of unit to dev as appropriate. Minor comment fixes
to pcic_softc definition.
Diffstat (limited to 'sys/pccard')
-rw-r--r-- | sys/pccard/pcic.c | 4 | ||||
-rw-r--r-- | sys/pccard/pcic_isa.c | 2 | ||||
-rw-r--r-- | sys/pccard/pcicvar.h | 22 |
3 files changed, 15 insertions, 13 deletions
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 2316f74..7e3496c 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -623,8 +623,8 @@ pcictimeout(void *chan) struct pcic_softc *sc = (struct pcic_softc *) chan; if (pcicintr1(chan) != 0) { - printf("pcic%d: Static bug detected, ignoring hardware.\n", - ((struct pcic_softc *)chan)->unit); + device_printf(sc->dev, + "Static bug detected, ignoring hardware."); return; } sc->timeout_ch = timeout(pcictimeout, chan, hz/2); diff --git a/sys/pccard/pcic_isa.c b/sys/pccard/pcic_isa.c index 5f82180..5e18bb2 100644 --- a/sys/pccard/pcic_isa.c +++ b/sys/pccard/pcic_isa.c @@ -107,7 +107,7 @@ pcic_isa_probe(device_t dev) } sc = (struct pcic_softc *) device_get_softc(dev); - sc->unit = device_get_unit(dev); + sc->dev = dev; sp = &sc->slots[0]; for (slotnum = 0; slotnum < PCIC_CARD_SLOTS; slotnum++, sp++) { /* diff --git a/sys/pccard/pcicvar.h b/sys/pccard/pcicvar.h index e11f486..7fd6c562 100644 --- a/sys/pccard/pcicvar.h +++ b/sys/pccard/pcicvar.h @@ -42,22 +42,24 @@ struct pcic_slot { struct pcic_softc { - u_int32_t slotmask; /* Mask of valid slots */ - u_int32_t flags; /* Interesting flags */ + u_int32_t slotmask;/* Mask of valid slots */ + u_int32_t flags; /* Interesting flags */ #define PCIC_AB_POWER 0x00000001 /* Use old A/B step power */ #define PCIC_DF_POWER 0x00000002 /* Uses DF step regs */ #define PCIC_PD_POWER 0x00000004 /* Uses CL-PD regs */ #define PCIC_VG_POWER 0x00000008 /* Uses VG power regs */ #define PCIC_KING_POWER 0x00000010 /* Uses IBM KING regs */ #define PCIC_RICOH_POWER 0x00000020 /* Uses the ricoh power regs */ - int iorid; /* Rid of I/O region */ - struct resource *iores; /* resource for I/O region */ - int memrid; - struct resource *memres; - int irqrid; - struct resource *irqres; - void *ih; - int unit; + int iorid; /* Rid of I/O region */ + struct resource *iores; /* resource for I/O region */ + int memrid; /* Memory rid */ + struct resource *memres;/* Resource for memory mapped regs */ + int irqrid; /* Irq rid */ + struct resource *irqres;/* Irq resource */ + void *ih; /* Our interrupt handler. */ + device_t dev; /* Our device */ + bus_space_tag_t bst; /* Bus tag for our regs */ + bus_space_handle_t bsh; /* Bus handle for our regs */ struct callout_handle timeout_ch; struct pcic_slot slots[PCIC_MAX_SLOTS]; }; |