fbdev: Fbmon cleanup

Started by Antonino A. Daplas on Jan 13, 2005

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
While browsing the video/fbcon.c source file (Linux 2.6.10-rc3) I found
some possible cleanups. Patch follows, feel free to apply all or parts
of it if it looks OK to you.

Remove unnecessary bit operations.

Signed-off-by: Jean Delvare <redacted>
Signed-off-by: Antonino Daplas <redacted>
---

 fbmon.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff -Nru a/drivers/video/fbmon.c b/drivers/video/fbmon.c
--- a/drivers/video/fbmon.c	2005-01-13 20:12:49 +08:00
+++ b/drivers/video/fbmon.c	2005-01-13 06:00:15 +08:00
@@ -662,7 +662,7 @@
 
 	fb_get_monitor_limits(edid, specs);
 
-	c = (block[0] & 0x80) >> 7;
+	c = block[0] & 0x80;
 	specs->input = 0;
 	if (c) {
 		specs->input |= FB_DISP_DDI;
@@ -686,13 +686,10 @@
 			DPRINTK("0.700V/0.000V");
 			specs->input |= FB_DISP_ANA_700_000;
 			break;
-		default:
-			DPRINTK("unknown");
-			specs->input |= FB_DISP_UNKNOWN;
 		}
 	}
 	DPRINTK("\n      Sync: ");
-	c = (block[0] & 0x10) >> 4;
+	c = block[0] & 0x10;
 	if (c)
 		DPRINTK("      Configurable signal level\n");
 	c = block[0] & 0x0f;




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help