staging: xgifb: delete duplicated default video mode setup code
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 29 Aug 2011 20:14:28 +0000 (23:14 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 18:41:23 +0000 (11:41 -0700)
The code for determining the default video mode is unnecessarily
duplicated in XGIfb_search_mode() and XGIfb_search_vesamode() functions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/xgifb/XGI_main_26.c

index 074fe4f9606ebef2a4ad2cb15599e8136aa051e4..34678a3b0fc2ada61cb9093174bc907e3209132e 100644 (file)
@@ -460,12 +460,6 @@ static void XGIfb_search_mode(const char *name)
 
        if (!strcmp(name, XGIbios_mode[MODE_INDEX_NONE].name)) {
                printk(KERN_ERR "XGIfb: Mode 'none' not supported anymore. Using default.\n");
-               xgifb_mode_idx = DEFAULT_MODE;
-               if ((xgi_video_info.chip == XG21)
-                               && ((xgi_video_info.disp_state & DISPTYPE_DISP2)
-                                               == DISPTYPE_LCD)) {
-                       xgifb_mode_idx = XGIfb_GetXG21DefaultLVDSModeIdx();
-               }
                return;
        }
 
@@ -489,12 +483,6 @@ static void XGIfb_search_vesamode(unsigned int vesamode)
        if (vesamode == 0) {
 
                printk(KERN_ERR "XGIfb: Mode 'none' not supported anymore. Using default.\n");
-               xgifb_mode_idx = DEFAULT_MODE;
-               if ((xgi_video_info.chip == XG21)
-                               && ((xgi_video_info.disp_state & DISPTYPE_DISP2)
-                                               == DISPTYPE_LCD)) {
-                       xgifb_mode_idx = XGIfb_GetXG21DefaultLVDSModeIdx();
-               }
                return;
        }