[PATCH] savage: Fix &/&& typo in "magical" register setup

Tormod Volden lists.tormod at gmail.com
Wed Apr 20 15:36:44 PDT 2011


From: Tormod Volden <debian.tormod at gmail.com>

Found with CFLAGS=-Wlogical-op

Signed-off-by: Tormod Volden <debian.tormod at gmail.com>
---

I hope I don't break the magic. BTW, LCD_ACTIVE is 0x02.

 src/savage_driver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/savage_driver.c b/src/savage_driver.c
index 2edd844..e5b786c 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -2561,7 +2561,7 @@ static void SavageWriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr,
 			(restore->refresh >= 75)
 		    )
 		    {
-			if( cr6d && LCD_ACTIVE )
+			if( cr6d & LCD_ACTIVE )
 			    cr79 = 0x05;
 			else
 			    cr79 = 0x08;
@@ -2578,7 +2578,7 @@ static void SavageWriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr,
  */
 		    if( pScrn->displayWidth == 1024 )
 		    {
-			if( cr6d && LCD_ACTIVE )
+			if( cr6d & LCD_ACTIVE )
 			    cr79 = 0x08;
 			else
 			    cr79 = 0x0e;
-- 
1.7.0.4



More information about the xorg-devel mailing list