diff --git a/sys/arch/macppc/dev/ofb.c b/sys/arch/macppc/dev/ofb.c index 5f8f5e802bdc..cc1f4d8f5dd9 100644 --- a/sys/arch/macppc/dev/ofb.c +++ b/sys/arch/macppc/dev/ofb.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofb.c,v 1.69 2012/10/27 17:18:00 chs Exp $ */ +/* $NetBSD: ofb.c,v 1.70 2016/05/23 01:45:41 chs Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofb.c,v 1.69 2012/10/27 17:18:00 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofb.c,v 1.70 2016/05/23 01:45:41 chs Exp $"); #include #include @@ -317,7 +317,6 @@ ofb_mmap(void *v, void *vs, off_t offset, int prot) { struct vcons_data *vd = v; struct ofb_softc *sc = vd->cookie; - struct rasops_info *ri; u_int32_t *ap = sc->sc_addrs; int i; @@ -326,8 +325,6 @@ ofb_mmap(void *v, void *vs, off_t offset, int prot) return -1; } - ri = &vd->active->scr_ri; - /* framebuffer at offset 0 */ if ((offset >= 0) && (offset < sc->sc_fbsize)) return bus_space_mmap(sc->sc_memt, sc->sc_fbaddr, offset, prot, @@ -444,10 +441,10 @@ ofb_putpalreg(struct ofb_softc *sc, int idx, uint8_t r, uint8_t g, uint8_t b) static void ofb_init_cmap(struct ofb_softc *sc) { - int idx, i; + int i; + /* mess with the palette only when we're running in 8 bit */ if (rascons_console_screen.scr_ri.ri_depth == 8) { - idx = 0; for (i = 0; i < 256; i++) { ofb_putpalreg(sc, i, rasops_cmap[(i * 3) + 0], rasops_cmap[(i * 3) + 1],