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,19 +1225,32 @@ int fb_get_options(char *name, char **option) ...@@ -1225,19 +1225,32 @@ int fb_get_options(char *name, char **option)
* *
*/ */
extern const char *global_mode_option;
int __init video_setup(char *options) int __init video_setup(char *options)
{ {
int i; int i, global = 0;
if (!options || !*options) 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;
} }
} }
......
...@@ -29,9 +29,7 @@ ...@@ -29,9 +29,7 @@
#define DPRINTK(fmt, args...) #define DPRINTK(fmt, args...)
#endif #endif
const char *global_mode_option;
const char *global_mode_option = NULL;
/* /*
* Standard video mode definitions (taken from XFree86) * 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