summaryrefslogtreecommitdiffstats
path: root/sys/dev/fb
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2003-11-11 07:34:08 +0000
committerjake <jake@FreeBSD.org>2003-11-11 07:34:08 +0000
commit7e2dc8ca6b8fe0f46e39dbd2aff9d90fd6ed3e4c (patch)
treea9b9270331f789aeaf5cce52a577843c506826ff /sys/dev/fb
parent3b6b5ab52395a7469e2d44e74d66e41f90f4622b (diff)
downloadFreeBSD-src-7e2dc8ca6b8fe0f46e39dbd2aff9d90fd6ed3e4c.zip
FreeBSD-src-7e2dc8ca6b8fe0f46e39dbd2aff9d90fd6ed3e4c.tar.gz
Fix a typo. Allow for the creator not being stdout.
Diffstat (limited to 'sys/dev/fb')
-rw-r--r--sys/dev/fb/creator.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/fb/creator.c b/sys/dev/fb/creator.c
index 433f42a..05cf570 100644
--- a/sys/dev/fb/creator.c
+++ b/sys/dev/fb/creator.c
@@ -170,22 +170,21 @@ creator_configure(int flags)
char buf[32];
int i;
- chosen = OF_finddevice("/chosen");
-
- OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
+ sc = &creator_softc;
for (child = OF_child(OF_peer(0)); child != 0;
child = OF_peer(child)) {
OF_getprop(child, "name", buf, sizeof(buf));
- if (child == OF_instance_to_package(stdout) &&
- (strcmp(buf, "SUNW,ffb") == 0 ||
- strcmp(buf, "SUNW,afb") == 0))
+ if (strcmp(buf, "SUNW,ffb") == 0 ||
+ strcmp(buf, "SUNW,afb") == 0)
break;
}
if (child == 0)
return (0);
- sc = &creator_softc;
- sc->sc_console = 1;
+ chosen = OF_finddevice("/chosen");
+ OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
+ if (child == stdout)
+ sc->sc_console = 1;
OF_getprop(child, "reg", reg, sizeof(reg));
for (i = 0; i < FFB_NREG; i++) {
@@ -439,7 +438,7 @@ creator_set_hw_cursor(video_adapter_t *adp, int col, int row)
struct creator_softc *sc;
sc = (struct creator_softc *)adp;
- if (sc->sc_colp != NULL ** sc->sc_rowp != NULL) {
+ if (sc->sc_colp != NULL && sc->sc_rowp != NULL) {
*sc->sc_colp = col;
*sc->sc_rowp = row;
}
OpenPOWER on IntegriCloud