From 624554dae32ac1e0a2a2117224c778cf238ee233 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Tue, 11 Oct 2011 21:47:35 +0300 Subject: staging: xgifb: make DAC tables const DAC tables are read-only and can be made const. Signed-off-by: Aaro Koskinen Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/xgifb/vb_setmode.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 8f3a8127d09..81c0cc41bb4 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; -- cgit v1.2.3