summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1996-10-10 19:52:10 +0000
committerchristos <christos@NetBSD.org>1996-10-10 19:52:10 +0000
commit9cc736c8395c58d7d720b9a54d22a12666cf132c (patch)
treea3bc65caee68dfd7a555602f17b4fc138369c763 /sys/dev
parente596968edac8863fb739de1e2e441249bb57a7fc (diff)
- printf -> kprintf, sprintf -> ksprintf
- remove unused variables. - fix cleanup code in case of probe failure.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/cy_pci.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/dev/pci/cy_pci.c b/sys/dev/pci/cy_pci.c
index a32b96290c3..7fca1c2768a 100644
--- a/sys/dev/pci/cy_pci.c
+++ b/sys/dev/pci/cy_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cy_pci.c,v 1.1 1996/09/24 17:59:33 christos Exp $ */
+/* $NetBSD: cy_pci.c,v 1.2 1996/10/10 19:52:10 christos Exp $ */
/*
* cy_pci.c
@@ -49,24 +49,24 @@ cy_map_pci(pa, sc, ioh, iosize, memsize)
if (pci_mem_find(pa->pa_pc, pa->pa_tag, 0x18, &memaddr, memsize,
&cacheable) != 0) {
- printf("%s: can't find PCI card memory", sc->sc_dev.dv_xname);
+ kprintf("%s: can't find PCI card memory", sc->sc_dev.dv_xname);
return 0;
}
/* map the memory (non-cacheable) */
if (bus_mem_map(sc->sc_bc, memaddr, *memsize, 0, &sc->sc_memh) != 0) {
- printf("%s: couldn't map PCI memory region\n",
+ kprintf("%s: couldn't map PCI memory region\n",
sc->sc_dev.dv_xname);
return 0;
}
/* the PCI Cyclom IO space is only used for enabling interrupts */
if (pci_io_find(pa->pa_pc, pa->pa_tag, 0x14, &iobase, iosize) != 0) {
- printf("%s: couldn't find PCI io region\n",
+ kprintf("%s: couldn't find PCI io region\n",
sc->sc_dev.dv_xname);
goto unmapmem;
}
if (bus_io_map(sc->sc_bc, iobase, *iosize, ioh) != 0) {
- printf("%s: couldn't map PCI io region\n", sc->sc_dev.dv_xname);
- goto unmapmem;
+ kprintf("%s: couldn't map PCI io region\n", sc->sc_dev.dv_xname);
+ goto unmapio;
}
return 1;
@@ -94,7 +94,6 @@ cy_probe_pci(parent, match, aux)
struct device *parent;
void *match, *aux;
{
- vm_offset_t v_addr, p_addr;
struct pci_attach_args *pa = aux;
bus_io_handle_t ioh;
bus_mem_size_t memsize;
@@ -115,7 +114,7 @@ cy_probe_pci(parent, match, aux)
}
#ifdef CY_DEBUG
- printf("cy: Found Cyclades PCI device, id = 0x%x\n", pa->pa_id);
+ kprintf("cy: Found Cyclades PCI device, id = 0x%x\n", pa->pa_id);
#endif
memcpy(&sc.sc_dev, match, sizeof(struct device));
@@ -126,12 +125,12 @@ cy_probe_pci(parent, match, aux)
return 0;
#ifdef CY_DEBUG
- printf("%s: pci mapped mem 0x%lx (size %d), io 0x%x (size %d)\n",
+ kprintf("%s: pci mapped mem 0x%lx (size %d), io 0x%x (size %d)\n",
sc.sc_dev.dv_xname, memaddr, memsize, iobase, iosize);
#endif
if ((rv = cy_find(&sc)) == 0)
- printf("%s: PCI Cyclom card with no CD1400s!?\n",
+ kprintf("%s: PCI Cyclom card with no CD1400s!?\n",
sc.sc_dev.dv_xname);
cy_unmap_pci(&sc, ioh, iosize, memsize);