aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index e8bad0296da..a9dc9489e34 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -48,6 +48,9 @@
48 48
49#define XGIFB_ROM_SIZE 65536 49#define XGIFB_ROM_SIZE 65536
50 50
51static char *mode;
52static int vesa;
53
51/* -------------------- Macro definitions ---------------------------- */ 54/* -------------------- Macro definitions ---------------------------- */
52 55
53#undef XGIFBDEBUG 56#undef XGIFBDEBUG
@@ -1959,9 +1962,9 @@ static int __init XGIfb_setup(char *options)
1959 continue; 1962 continue;
1960 1963
1961 if (!strncmp(this_opt, "mode:", 5)) { 1964 if (!strncmp(this_opt, "mode:", 5)) {
1962 XGIfb_search_mode(this_opt + 5); 1965 mode = this_opt + 5;
1963 } else if (!strncmp(this_opt, "vesa:", 5)) { 1966 } else if (!strncmp(this_opt, "vesa:", 5)) {
1964 XGIfb_search_vesamode(xgifb_optval(this_opt, 5)); 1967 vesa = xgifb_optval(this_opt, 5);
1965 } else if (!strncmp(this_opt, "vrate:", 6)) { 1968 } else if (!strncmp(this_opt, "vrate:", 6)) {
1966 xgi_video_info.refresh_rate = xgifb_optval(this_opt, 6); 1969 xgi_video_info.refresh_rate = xgifb_optval(this_opt, 6);
1967 } else if (!strncmp(this_opt, "rate:", 5)) { 1970 } else if (!strncmp(this_opt, "rate:", 5)) {
@@ -1987,7 +1990,7 @@ static int __init XGIfb_setup(char *options)
1987 } else if (!strncmp(this_opt, "userom:", 7)) { 1990 } else if (!strncmp(this_opt, "userom:", 7)) {
1988 XGIfb_userom = xgifb_optval(this_opt, 7); 1991 XGIfb_userom = xgifb_optval(this_opt, 7);
1989 } else { 1992 } else {
1990 XGIfb_search_mode(this_opt); 1993 mode = this_opt;
1991 } 1994 }
1992 } 1995 }
1993 return 0; 1996 return 0;
@@ -2308,6 +2311,11 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
2308 2311
2309 } 2312 }
2310 2313
2314 if (mode)
2315 XGIfb_search_mode(mode);
2316 else if (vesa != -1)
2317 XGIfb_search_vesamode(vesa);
2318
2311 if (xgifb_mode_idx >= 0) 2319 if (xgifb_mode_idx >= 0)
2312 xgifb_mode_idx = XGIfb_validate_mode(xgifb_mode_idx); 2320 xgifb_mode_idx = XGIfb_validate_mode(xgifb_mode_idx);
2313 2321
@@ -2513,9 +2521,6 @@ module_init(xgifb_init);
2513 2521
2514#ifdef MODULE 2522#ifdef MODULE
2515 2523
2516static char *mode;
2517static int vesa;
2518
2519MODULE_DESCRIPTION("Z7 Z9 Z9S Z11 framebuffer device driver"); 2524MODULE_DESCRIPTION("Z7 Z9 Z9S Z11 framebuffer device driver");
2520MODULE_LICENSE("GPL"); 2525MODULE_LICENSE("GPL");
2521MODULE_AUTHOR("XGITECH , Others"); 2526MODULE_AUTHOR("XGITECH , Others");
@@ -2541,10 +2546,6 @@ MODULE_PARM_DESC(filter,
2541static int __init xgifb_init_module(void) 2546static int __init xgifb_init_module(void)
2542{ 2547{
2543 printk("\nXGIfb_init_module"); 2548 printk("\nXGIfb_init_module");
2544 if (mode)
2545 XGIfb_search_mode(mode);
2546 else if (vesa != -1)
2547 XGIfb_search_vesamode(vesa);
2548 2549
2549 return xgifb_init(); 2550 return xgifb_init();
2550} 2551}