[PATCH 3/9] fbdev: Revive global_mode_option

DORMANTno replies

From: Antonino A. Daplas <hidden>
Date: 2004-12-21 21:37:02

The global_mode_option is useful for choosing the initial video mode
without specifying the driver, ie 'video=1024x768@60'.  After the
initialization cleanup, this variable was accidentally removed.  This patch 
brings it back again.

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

 fbmem.c  |   29 +++++++++++++++++++++--------
 modedb.c |    4 +---
 2 files changed, 22 insertions(+), 11 deletions(-)

diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c
--- a/drivers/video/fbmem.c	2004-12-18 20:38:35 +08:00
+++ b/drivers/video/fbmem.c	2004-12-21 05:44:01 +08:00
@@ -1224,19 +1224,32 @@
  *
  */
 
+extern const char *global_mode_option;
+
 int __init video_setup(char *options)
 {
-	int i;
+	int i, global = 0;
 
 	if (!options || !*options)
-		return 0;
+ 		global = 1;
+ 
+ 	if (!global && !strncmp(options, "ofonly", 6)) {
+ 		ofonly = 1;
+ 		global = 1;
+ 	}
+ 
+ 	if (!global && !strstr(options, "fb:")) {
+ 		global_mode_option = options;
+ 		global = 1;
+ 	}
+  
+ 	if (!global) {
+ 		for (i = 0; i < FB_MAX; i++) {
+ 			if (video_options[i] == NULL) {
+ 				video_options[i] = options;
+ 				break;
+ 			}
 
-	for (i = 0; i < FB_MAX; i++) {
-		if (!strncmp(options, "ofonly", 6))
-			ofonly = 1;
-		if (video_options[i] == NULL) {
-			video_options[i] = options;
-			break;
 		}
 	}
 
diff -Nru a/drivers/video/modedb.c b/drivers/video/modedb.c
--- a/drivers/video/modedb.c	2004-11-17 18:15:20 +08:00
+++ b/drivers/video/modedb.c	2004-11-28 09:18:42 +08:00
@@ -29,9 +29,7 @@
 #define DPRINTK(fmt, args...)
 #endif
 
-
-const char *global_mode_option = NULL;
-
+const char *global_mode_option;
 
     /*
      *  Standard video mode definitions (taken from XFree86)





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help