Commit 76ad1ae3 authored by Antonino Daplas's avatar Antonino Daplas Committed by Linus Torvalds

[PATCH] fbdev: Revive global_mode_option

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: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b839824a
......@@ -1225,20 +1225,33 @@ int fb_get_options(char *name, char **option)
*
*/
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;
for (i = 0; i < FB_MAX; i++) {
if (!strncmp(options, "ofonly", 6))
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;
}
}
}
return 0;
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment