diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2012-11-04 23:15:05 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-14 00:54:30 +0400 |
commit | ea12b4e077b86998f73740be7eadb7b08481ea36 (patch) | |
tree | 7a4a231c9f1840582a411cdebfe92bd233858712 /drivers/staging/xgifb | |
parent | 0904f7f315cc1a3c643b49751147bc5f3c8a22d4 (diff) | |
download | linux-ea12b4e077b86998f73740be7eadb7b08481ea36.tar.xz |
staging: xgifb: eliminate pVBInfo->AGPReg
Access XGI340_AGPReg directly and make it const.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r-- | drivers/staging/xgifb/vb_def.h | 1 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_init.c | 6 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.c | 1 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_struct.h | 1 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_table.h | 2 |
5 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/xgifb/vb_def.h b/drivers/staging/xgifb/vb_def.h index ee13b848dce2..148f6373c9a2 100644 --- a/drivers/staging/xgifb/vb_def.h +++ b/drivers/staging/xgifb/vb_def.h @@ -264,5 +264,6 @@ extern const struct XGI_CRT1TableStruct XGI_CRT1Table[]; extern const struct XGI_ECLKDataStruct XGI340_ECLKData[]; extern const struct SiS_VCLKData XGI_VCLKData[]; extern const unsigned char XGI340_CR6B[][4]; +extern const unsigned char XGI340_AGPReg[]; #endif diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 213ec1366a9e..2b791c10eb15 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -1378,17 +1378,17 @@ unsigned char XGIInitNew(struct pci_dev *pdev) for (i = 0x47; i <= 0x4C; i++) xgifb_reg_set(pVBInfo->P3d4, i, - pVBInfo->AGPReg[i - 0x47]); + XGI340_AGPReg[i - 0x47]); for (i = 0x70; i <= 0x71; i++) xgifb_reg_set(pVBInfo->P3d4, i, - pVBInfo->AGPReg[6 + i - 0x70]); + XGI340_AGPReg[6 + i - 0x70]); for (i = 0x74; i <= 0x77; i++) xgifb_reg_set(pVBInfo->P3d4, i, - pVBInfo->AGPReg[8 + i - 0x74]); + XGI340_AGPReg[8 + i - 0x74]); pci_read_config_dword(pdev, 0x50, &Temp); Temp >>= 20; diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 4d50940899ce..eaa5686a5fc5 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -33,7 +33,6 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo) pVBInfo->SR15 = XGI340_SR13; pVBInfo->CR40 = XGI340_cr41; - pVBInfo->AGPReg = XGI340_AGPReg; /* 310 customization related */ if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV)) diff --git a/drivers/staging/xgifb/vb_struct.h b/drivers/staging/xgifb/vb_struct.h index 407b4a7c1009..60aecb4af268 100644 --- a/drivers/staging/xgifb/vb_struct.h +++ b/drivers/staging/xgifb/vb_struct.h @@ -161,7 +161,6 @@ struct vb_device_info { unsigned char (*SR15)[8]; unsigned char (*CR40)[8]; - unsigned char *AGPReg; struct SiS_MCLKData *MCLKData; unsigned char *pXGINew_DRAMTypeDefinition; diff --git a/drivers/staging/xgifb/vb_table.h b/drivers/staging/xgifb/vb_table.h index f0fd0ecba155..4d7a70e7bdf8 100644 --- a/drivers/staging/xgifb/vb_table.h +++ b/drivers/staging/xgifb/vb_table.h @@ -115,7 +115,7 @@ const unsigned char XGI340_CR6B[8][4] = { }; /* CR47,CR48,CR49,CR4A,CR4B,CR4C,CR70,CR71,CR74,CR75,CR76,CR77 */ -static unsigned char XGI340_AGPReg[12] = { +const unsigned char XGI340_AGPReg[12] = { 0x28, 0x23, 0x00, 0x20, 0x00, 0x20, 0x00, 0x05, 0xd0, 0x10, 0x10, 0x00 }; |