[commit] r2423 - trunk/linux-2.6.x/arch/arm/mach-nds/arm7

dslinux_sonny_jim at dslinux.in-berlin.de dslinux_sonny_jim at dslinux.in-berlin.de
Wed Jul 1 11:28:51 CEST 2009


Author: dslinux_sonny_jim
Date: Wed Jul  1 11:28:51 2009
New Revision: 2423

Log:
Unstupify DSLite detection

Modified:
   trunk/linux-2.6.x/arch/arm/mach-nds/arm7/main.c

Modified: trunk/linux-2.6.x/arch/arm/mach-nds/arm7/main.c
==============================================================================
--- trunk/linux-2.6.x/arch/arm/mach-nds/arm7/main.c	(original)
+++ trunk/linux-2.6.x/arch/arm/mach-nds/arm7/main.c	Wed Jul  1 11:28:51 2009
@@ -18,14 +18,9 @@
 
 static struct nds_firmware_block *firmware_block;
 
-int DSLiteDetect(void)
+int isDSLite(void)
 {
-	//u32 data;
-	//data = power_read(POWER_BACKLIGHT);
-	//data &=  (1<<6);
-	if (power_read(POWER_BACKLIGHT) & (1<<6)) return 0;//DSLite
-	else
-		return 1;
+	return ((power_read(POWER_BACKLIGHT)) & (1<<6));
 }
 	
 /* recieve outstanding FIFO commands from ARM9 */
@@ -64,7 +59,7 @@
 			cmddata = FIFO_POWER_GET_DATA(data);
 			switch (cmd) {
 			case FIFO_POWER_CMD_BACKLIGHT_BRIGHTNESS:
-					if (DSLiteDetect() == 1) break;
+					if (isDSLite() == 0) break;
 					switch (cmddata) {
 					case 0:
 						data = power_read(POWER_BACKLIGHT);


More information about the dslinux-commit mailing list