Module Name: src Committed By: tsutsui Date: Wed Jan 26 13:14:07 UTC 2011
Modified Files: src/sys/arch/dreamcast/dev: pvr.c Log Message: Add proper prefix to structures. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/dreamcast/dev/pvr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/dreamcast/dev/pvr.c diff -u src/sys/arch/dreamcast/dev/pvr.c:1.30 src/sys/arch/dreamcast/dev/pvr.c:1.31 --- src/sys/arch/dreamcast/dev/pvr.c:1.30 Sun Oct 24 13:34:27 2010 +++ src/sys/arch/dreamcast/dev/pvr.c Wed Jan 26 13:14:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pvr.c,v 1.30 2010/10/24 13:34:27 tsutsui Exp $ */ +/* $NetBSD: pvr.c,v 1.31 2011/01/26 13:14:07 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.30 2010/10/24 13:34:27 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.31 2011/01/26 13:14:07 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -143,7 +143,7 @@ int dc_dispflags; /* display flags */ int dc_tvsystem; /* TV broadcast system */ - struct rasops_info rinfo; + struct rasops_info dc_rinfo; }; #define PVR_RGBMODE 0x01 /* RGB or composite */ @@ -152,7 +152,7 @@ struct pvr_softc { device_t sc_dev; struct fb_devconfig *sc_dc; /* device configuration */ - int nscreens; + int sc_nscreens; }; static int pvr_match(device_t, cfdata_t, void *); @@ -237,14 +237,14 @@ /* Initialize the device. */ pvrinit(dc); - dc->rinfo.ri_flg = 0; + dc->dc_rinfo.ri_flg = 0; if (dc == &pvr_console_dc) - dc->rinfo.ri_flg |= RI_NO_AUTO; - dc->rinfo.ri_depth = dc->dc_depth; - dc->rinfo.ri_bits = (void *) dc->dc_videobase; - dc->rinfo.ri_width = dc->dc_wid; - dc->rinfo.ri_height = dc->dc_ht; - dc->rinfo.ri_stride = dc->dc_rowbytes; + dc->dc_rinfo.ri_flg |= RI_NO_AUTO; + dc->dc_rinfo.ri_depth = dc->dc_depth; + dc->dc_rinfo.ri_bits = (void *) dc->dc_videobase; + dc->dc_rinfo.ri_width = dc->dc_wid; + dc->dc_rinfo.ri_height = dc->dc_ht; + dc->dc_rinfo.ri_stride = dc->dc_rowbytes; wsfont_init(); /* prefer 8 pixel wide font */ @@ -258,19 +258,19 @@ return; } - if (wsfont_lock(cookie, &dc->rinfo.ri_font)) { + if (wsfont_lock(cookie, &dc->dc_rinfo.ri_font)) { printf("pvr: unable to lock font\n"); return; } - dc->rinfo.ri_wsfcookie = cookie; + dc->dc_rinfo.ri_wsfcookie = cookie; - rasops_init(&dc->rinfo, 500, 500); + rasops_init(&dc->dc_rinfo, 500, 500); /* XXX shouldn't be global */ - pvr_stdscreen.nrows = dc->rinfo.ri_rows; - pvr_stdscreen.ncols = dc->rinfo.ri_cols; - pvr_stdscreen.textops = &dc->rinfo.ri_ops; - pvr_stdscreen.capabilities = dc->rinfo.ri_caps; + pvr_stdscreen.nrows = dc->dc_rinfo.ri_rows; + pvr_stdscreen.ncols = dc->dc_rinfo.ri_cols; + pvr_stdscreen.textops = &dc->dc_rinfo.ri_ops; + pvr_stdscreen.capabilities = dc->dc_rinfo.ri_caps; /* XXX yuck */ sprintf(pvr_stdscreen_textgeom, "%dx%d", pvr_stdscreen.ncols, @@ -290,8 +290,8 @@ console = pvr_is_console; if (console) { sc->sc_dc = &pvr_console_dc; - sc->sc_dc->rinfo.ri_flg &= ~RI_NO_AUTO; - sc->nscreens = 1; + sc->sc_dc->dc_rinfo.ri_flg &= ~RI_NO_AUTO; + sc->sc_nscreens = 1; } else { sc->sc_dc = malloc(sizeof(struct fb_devconfig), M_DEVBUF, M_WAITOK); @@ -334,7 +334,7 @@ return 0; case WSDISPLAYIO_LINEBYTES: - *(u_int *)data = sc->sc_dc->rinfo.ri_stride; + *(u_int *)data = sc->sc_dc->dc_rinfo.ri_stride; return 0; case WSDISPLAYIO_GETCMAP: @@ -409,16 +409,16 @@ struct pvr_softc *sc = v; long defattr; - if (sc->nscreens > 0) + if (sc->sc_nscreens > 0) return ENOMEM; - *cookiep = &sc->sc_dc->rinfo; /* one and only for now */ + *cookiep = &sc->sc_dc->dc_rinfo; /* one and only for now */ *curxp = 0; *curyp = 0; - (*sc->sc_dc->rinfo.ri_ops.allocattr)(&sc->sc_dc->rinfo, 0, 0, 0, + (*sc->sc_dc->dc_rinfo.ri_ops.allocattr)(&sc->sc_dc->dc_rinfo, 0, 0, 0, &defattr); *attrp = defattr; - sc->nscreens++; + sc->sc_nscreens++; return 0; } @@ -430,7 +430,7 @@ if (sc->sc_dc == &pvr_console_dc) panic("pvr_free_screen: console"); - sc->nscreens--; + sc->sc_nscreens--; } int @@ -587,8 +587,8 @@ long defattr; pvr_getdevconfig(dcp); - (*dcp->rinfo.ri_ops.allocattr)(&dcp->rinfo, 0, 0, 0, &defattr); - wsdisplay_cnattach(&pvr_stdscreen, &dcp->rinfo, 0, 0, defattr); + (*dcp->dc_rinfo.ri_ops.allocattr)(&dcp->dc_rinfo, 0, 0, 0, &defattr); + wsdisplay_cnattach(&pvr_stdscreen, &dcp->dc_rinfo, 0, 0, defattr); pvr_is_console = 1;