linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/9] fbdev: Revive global_mode_option
@ 2004-12-21 21:31 Antonino A. Daplas
  0 siblings, 0 replies; only message in thread
From: Antonino A. Daplas @ 2004-12-21 21:31 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Fbdev development list

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 <adaplas@pol.net>
---

 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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-12-21 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-21 21:31 [PATCH 3/9] fbdev: Revive global_mode_option Antonino A. Daplas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).