tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

^= usage



Just a little simplification - thought I'd share.


Index: sys/arch/hpcarm/dev/sed_saip.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hpcarm/dev/sed_saip.c,v
retrieving revision 1.26
diff -u -p -r1.26 sed_saip.c
--- sys/arch/hpcarm/dev/sed_saip.c	27 Oct 2012 17:17:52 -0000	1.26
+++ sys/arch/hpcarm/dev/sed_saip.c	8 Dec 2015 02:33:41 -0000
@@ -708,10 +708,7 @@ sed1356_toggle_lcdlight(void)
 {
 	struct sed1356_softc *sc = device_lookup_private(&sed_cd, 0);
 
-	if (sc->sc_powerstate & PWRSTAT_VIDEOOFF)
-		sc->sc_powerstate &= ~PWRSTAT_VIDEOOFF;
-	else
-		sc->sc_powerstate |= PWRSTAT_VIDEOOFF;
+	sc->sc_powerstate ^= PWRSTAT_VIDEOOFF;
 
 	sed1356_update_powerstate(sc, PWRSTAT_ALL);
 }


Home | Main Index | Thread Index | Old Index