Commit 7548a83e authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: add a global variable for the default refresh rate

Add a global variable for the default refresh rate. This is done to
get rid of references to xgi_video_info before the probe routine, which
should allocate the xgi_video_info dynamically in the future.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6048d761
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
static char *mode; static char *mode;
static int vesa = -1; static int vesa = -1;
static unsigned int refresh_rate;
/* -------------------- Macro definitions ---------------------------- */ /* -------------------- Macro definitions ---------------------------- */
...@@ -1890,9 +1891,9 @@ static int __init XGIfb_setup(char *options) ...@@ -1890,9 +1891,9 @@ static int __init XGIfb_setup(char *options)
} else if (!strncmp(this_opt, "vesa:", 5)) { } else if (!strncmp(this_opt, "vesa:", 5)) {
vesa = xgifb_optval(this_opt, 5); vesa = xgifb_optval(this_opt, 5);
} else if (!strncmp(this_opt, "vrate:", 6)) { } else if (!strncmp(this_opt, "vrate:", 6)) {
xgi_video_info.refresh_rate = xgifb_optval(this_opt, 6); refresh_rate = xgifb_optval(this_opt, 6);
} else if (!strncmp(this_opt, "rate:", 5)) { } else if (!strncmp(this_opt, "rate:", 5)) {
xgi_video_info.refresh_rate = xgifb_optval(this_opt, 5); refresh_rate = xgifb_optval(this_opt, 5);
} else if (!strncmp(this_opt, "crt1off", 7)) { } else if (!strncmp(this_opt, "crt1off", 7)) {
XGIfb_crt1off = 1; XGIfb_crt1off = 1;
} else if (!strncmp(this_opt, "filter:", 7)) { } else if (!strncmp(this_opt, "filter:", 7)) {
...@@ -2276,6 +2277,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -2276,6 +2277,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
XGIfb_mode_no = XGIbios_mode[xgifb_mode_idx].mode_no; XGIfb_mode_no = XGIbios_mode[xgifb_mode_idx].mode_no;
/* yilin set default refresh rate */ /* yilin set default refresh rate */
xgi_video_info.refresh_rate = refresh_rate;
if (xgi_video_info.refresh_rate == 0) if (xgi_video_info.refresh_rate == 0)
xgi_video_info.refresh_rate = 60; xgi_video_info.refresh_rate = 60;
if (XGIfb_search_refresh_rate( if (XGIfb_search_refresh_rate(
......
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