Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/newsmips/dev Fix an uninitialized variable reference.
details: https://anonhg.NetBSD.org/src/rev/78629f73b487
branches: trunk
changeset: 499272:78629f73b487
user: tsubai <tsubai%NetBSD.org@localhost>
date: Wed Nov 15 15:01:14 2000 +0000
description:
Fix an uninitialized variable reference.
diffstat:
sys/arch/newsmips/dev/fb.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diffs (55 lines):
diff -r cdfca940a24f -r 78629f73b487 sys/arch/newsmips/dev/fb.c
--- a/sys/arch/newsmips/dev/fb.c Wed Nov 15 14:43:44 2000 +0000
+++ b/sys/arch/newsmips/dev/fb.c Wed Nov 15 15:01:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fb.c,v 1.7 2000/11/15 14:43:44 tsubai Exp $ */
+/* $NetBSD: fb.c,v 1.8 2000/11/15 15:01:14 tsubai Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -67,7 +67,7 @@
void fb_cnattach(void);
-static void fb253_init(int);
+static void fb253_init();
struct cfattach fb_ca = {
sizeof(struct fb_softc), fb_match, fb_attach,
@@ -155,7 +155,7 @@
/* clear screen */
(*ri->ri_ops.eraserows)(ri, 0, ri->ri_rows, 0);
- fb253_init(id);
+ fb253_init();
}
sc->sc_dc = dc;
@@ -261,11 +261,8 @@
if (*(int *)data == WSDISPLAYIO_VIDEO_OFF) {
volatile u_short *ctlreg = NWB253_CTLREG;
*ctlreg = 0; /* stop crtc */
- } else {
- volatile u_short *ctlreg = NWB253_CTLREG;
- int id = (*ctlreg >> 8) & 0xf;
- fb253_init(id);
- }
+ } else
+ fb253_init();
return 0;
case WSDISPLAYIO_GETCMAP:
@@ -437,11 +434,11 @@
};
static void
-fb253_init(id)
- int id;
+fb253_init()
{
volatile u_short *ctlreg = NWB253_CTLREG;
volatile u_short *crtreg = NWB253_CRTREG;
+ int id = (*ctlreg >> 8) & 0xf;
u_char *p;
int i;
Home |
Main Index |
Thread Index |
Old Index