diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2011-10-11 18:47:35 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-12 15:51:49 (GMT) |
commit | 624554dae32ac1e0a2a2117224c778cf238ee233 (patch) | |
tree | dbdaa730d36426d6429794a916ff5cdb4babd053 | |
parent | 4397c7f03b52b3a26fd5e1ed934f0d1a66160b33 (diff) | |
download | linux-fsl-qoriq-624554dae32ac1e0a2a2117224c778cf238ee233.tar.xz |
staging: xgifb: make DAC tables const
DAC tables are read-only and can be made const.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 8f3a812..81c0cc4 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -16,7 +16,7 @@ #define IndexMask 0xff -static unsigned short XGINew_MDA_DAC[] = { +static const unsigned short XGINew_MDA_DAC[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, @@ -26,7 +26,7 @@ static unsigned short XGINew_MDA_DAC[] = { 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F}; -static unsigned short XGINew_CGA_DAC[] = { +static const unsigned short XGINew_CGA_DAC[] = { 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, @@ -36,7 +36,7 @@ static unsigned short XGINew_CGA_DAC[] = { 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F}; -static unsigned short XGINew_EGA_DAC[] = { +static const unsigned short XGINew_EGA_DAC[] = { 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x05, 0x15, 0x20, 0x30, 0x24, 0x34, 0x21, 0x31, 0x25, 0x35, 0x08, 0x18, 0x0C, 0x1C, 0x09, 0x19, 0x0D, 0x1D, @@ -46,7 +46,7 @@ static unsigned short XGINew_EGA_DAC[] = { 0x0A, 0x1A, 0x0E, 0x1E, 0x0B, 0x1B, 0x0F, 0x1F, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F}; -static unsigned short XGINew_VGA_DAC[] = { +static const unsigned short XGINew_VGA_DAC[] = { 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, 0x00, 0x05, 0x08, 0x0B, 0x0E, 0x11, 0x14, 0x18, @@ -1701,7 +1701,8 @@ static void XGI_LoadDAC(unsigned short ModeNo, unsigned short ModeIdIndex, struct vb_device_info *pVBInfo) { unsigned short data, data2, time, i, j, k, m, n, o, si, di, bx, dl, al, - ah, dh, *table = NULL; + ah, dh; + const unsigned short *table = NULL; if (ModeNo <= 0x13) data = pVBInfo->SModeIDTable[ModeIdIndex].St_ModeFlag; |