Skip to content

Commit

Permalink
staging: xgifb: delete all references to mode "none"
Browse files Browse the repository at this point in the history
Delete all references to mode "none". It should be handled like any
other invalid mode.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 44d0244 commit c322830
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
5 changes: 1 addition & 4 deletions drivers/staging/xgifb/XGI_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ static struct _XGIbios_mode {
u16 rows;
u8 chipset;
} XGIbios_mode[] = {
#define MODE_INDEX_NONE 0 /* TW: index for mode=none */
{"none", 0xFF, 0x0000, 0x0000, 0, 0, 0, 0, 0, 0,
MD_XGI300|MD_XGI315}, /* TW: for mode "none" */
{"320x240x16", 0x56, 0x0000, 0x0000, 320, 240, 16, 1, 40, 15,
MD_XGI315},
{"320x480x8", 0x5A, 0x0000, 0x0000, 320, 480, 8, 1, 40, 30,
Expand Down Expand Up @@ -255,7 +252,7 @@ static struct _XGIbios_mode {
MD_XGI300|MD_XGI315},
{"800x600x8", 0x30, 0x0103, 0x0103, 800, 600, 8, 1, 100, 37,
MD_XGI300|MD_XGI315},
#define DEFAULT_MODE 21 /* index for 800x600x16 */
#define DEFAULT_MODE 20 /* index for 800x600x16 */
{"800x600x16", 0x47, 0x0114, 0x0114, 800, 600, 16, 1, 100, 37,
MD_XGI300|MD_XGI315},
{"800x600x24", 0x63, 0x013b, 0x0115, 800, 600, 32, 1, 100, 37,
Expand Down
16 changes: 5 additions & 11 deletions drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#define XGIFB_ROM_SIZE 65536

static char *mode;
static int vesa;
static int vesa = -1;

/* -------------------- Macro definitions ---------------------------- */

Expand Down Expand Up @@ -458,11 +458,6 @@ static void XGIfb_search_mode(const char *name)
{
int i = 0, j = 0, l;

if (!strcmp(name, XGIbios_mode[MODE_INDEX_NONE].name)) {
printk(KERN_ERR "XGIfb: Mode 'none' not supported anymore. Using default.\n");
return;
}

while (XGIbios_mode[i].mode_no != 0) {
l = min(strlen(name), strlen(XGIbios_mode[i].name));
if (!strncmp(name, XGIbios_mode[i].name, l)) {
Expand All @@ -480,11 +475,8 @@ static void XGIfb_search_vesamode(unsigned int vesamode)
{
int i = 0, j = 0;

if (vesamode == 0) {

printk(KERN_ERR "XGIfb: Mode 'none' not supported anymore. Using default.\n");
return;
}
if (vesamode == 0)
goto invalid;

vesamode &= 0x1dff; /* Clean VESA mode number from other flags */

Expand All @@ -497,6 +489,8 @@ static void XGIfb_search_vesamode(unsigned int vesamode)
}
i++;
}

invalid:
if (!j)
printk(KERN_INFO "XGIfb: Invalid VESA mode 0x%x'\n", vesamode);
}
Expand Down

0 comments on commit c322830

Please sign in to comment.