From: "Antonino A. Daplas" 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 Signed-off-by: Andrew Morton --- 25-akpm/drivers/video/fbmem.c | 29 +++++++++++++++++++++-------- 25-akpm/drivers/video/modedb.c | 4 +--- 2 files changed, 22 insertions(+), 11 deletions(-) diff -puN drivers/video/fbmem.c~fbdev-revive-global_mode_option drivers/video/fbmem.c --- 25/drivers/video/fbmem.c~fbdev-revive-global_mode_option Thu Dec 23 14:11:09 2004 +++ 25-akpm/drivers/video/fbmem.c Thu Dec 23 14:11:09 2004 @@ -1225,19 +1225,32 @@ int fb_get_options(char *name, char **op * */ +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 -puN drivers/video/modedb.c~fbdev-revive-global_mode_option drivers/video/modedb.c --- 25/drivers/video/modedb.c~fbdev-revive-global_mode_option Thu Dec 23 14:11:09 2004 +++ 25-akpm/drivers/video/modedb.c Thu Dec 23 14:11:09 2004 @@ -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) _