Module Name:    src
Committed By:   jmcneill
Date:           Tue Feb 22 01:26:14 UTC 2011

Modified Files:
        src/sys/dev/wsfb: genfb.c

Log Message:
genfb_enable/disable_polling only matters if genfb is the console screen,
so make it a noop if it's not


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/wsfb/genfb.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/dev/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.37 src/sys/dev/wsfb/genfb.c:1.38
--- src/sys/dev/wsfb/genfb.c:1.37	Fri Feb 18 13:56:58 2011
+++ src/sys/dev/wsfb/genfb.c	Tue Feb 22 01:26:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.37 2011/02/18 13:56:58 jmcneill Exp $ */
+/*	$NetBSD: genfb.c,v 1.38 2011/02/22 01:26:14 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.37 2011/02/18 13:56:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.38 2011/02/22 01:26:14 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -691,9 +691,11 @@
 {
 	struct genfb_softc *sc = device_private(dev);
 
-	SCREEN_ENABLE_DRAWING(&sc->sc_console_screen);
-	vcons_hard_switch(&sc->sc_console_screen);
-	vcons_enable_polling(&sc->vd);
+	if (sc->sc_console_screen.scr_vd) {
+		SCREEN_ENABLE_DRAWING(&sc->sc_console_screen);
+		vcons_hard_switch(&sc->sc_console_screen);
+		vcons_enable_polling(&sc->vd);
+	}
 }
 
 void
@@ -701,5 +703,7 @@
 {
 	struct genfb_softc *sc = device_private(dev);
 
-	vcons_disable_polling(&sc->vd);
+	if (sc->sc_console_screen.scr_vd) {
+		vcons_disable_polling(&sc->vd);
+	}
 }

Reply via email to