diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-11-24 22:43:20 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-11-24 22:43:20 +0000 |
commit | 1b1b775efbf1ce5de10a4e90ce6f1b8fef11cf6d (patch) | |
tree | 8f11d2dab7028064b566ebe83b7f71890c6f1224 /sys/arch/mvme68k/dev/mc.c | |
parent | 3b6fc494d6c3ea81b031d03cd56c0569869c875f (diff) |
Prefer vaddr_t and paddr_t types in device softc, instead of void * and
heavy casts. Improves readability, no functional change.
Diffstat (limited to 'sys/arch/mvme68k/dev/mc.c')
-rw-r--r-- | sys/arch/mvme68k/dev/mc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/mvme68k/dev/mc.c b/sys/arch/mvme68k/dev/mc.c index cbc4ad1929f..b348000d639 100644 --- a/sys/arch/mvme68k/dev/mc.c +++ b/sys/arch/mvme68k/dev/mc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mc.c,v 1.16 2004/07/30 22:29:45 miod Exp $ */ +/* $OpenBSD: mc.c,v 1.17 2005/11/24 22:43:16 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -48,8 +48,8 @@ struct mcsoftc { struct device sc_dev; - void *sc_vaddr; - void *sc_paddr; + vaddr_t sc_vaddr; + paddr_t sc_paddr; struct mcreg *sc_mc; struct intrhand sc_nmiih; }; @@ -111,11 +111,11 @@ mc_scan(parent, child, args) oca.ca_offset = cf->cf_loc[0]; oca.ca_ipl = cf->cf_loc[1]; if (oca.ca_offset != -1 && ISIIOVA(sc->sc_vaddr + oca.ca_offset)) { - oca.ca_paddr = sc->sc_paddr + oca.ca_offset; oca.ca_vaddr = sc->sc_vaddr + oca.ca_offset; + oca.ca_paddr = sc->sc_paddr + oca.ca_offset; } else { - oca.ca_paddr = (void *)-1; - oca.ca_vaddr = (void *)-1; + oca.ca_vaddr = (vaddr_t)-1; + oca.ca_paddr = (paddr_t)-1; } oca.ca_bustype = BUS_MC; oca.ca_name = cf->cf_driver->cd_name; @@ -141,7 +141,7 @@ mcattach(parent, self, args) * we must adjust our address */ sc->sc_paddr = ca->ca_paddr; - sc->sc_vaddr = (void *)IIOV(sc->sc_paddr); + sc->sc_vaddr = IIOV(sc->sc_paddr); sc->sc_mc = (struct mcreg *)(sc->sc_vaddr + MC_MCCHIP_OFF); sys_mc = sc->sc_mc; |