From 274afb73bd14558d8363898c51d4ee708bba73b7 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Thu, 17 Jun 2010 13:10:43 -0400 Subject: [PATCH] Staging: xgifb: Remove PUCHAR typedef PUCHAR was unsigned char *, use that instead Signed-off-by: Bill Pemberton Cc: Arnaud Patard Signed-off-by: Greg Kroah-Hartman --- drivers/staging/xgifb/XGI_main_26.c | 5 +++-- drivers/staging/xgifb/vb_init.c | 12 ++++++------ drivers/staging/xgifb/vb_struct.h | 4 ++-- drivers/staging/xgifb/vb_util.c | 2 +- drivers/staging/xgifb/vgatypes.h | 16 ++++++---------- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 403b5d4c2b54..c3483b60cf31 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -2970,9 +2970,10 @@ int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) xgi_video_info.mmio_base = pci_resource_start(pdev, 1); XGIfb_mmio_size = pci_resource_len(pdev, 1); xgi_video_info.vga_base = pci_resource_start(pdev, 2) + 0x30; - XGIhw_ext.pjIOAddress = (PUCHAR)xgi_video_info.vga_base; + XGIhw_ext.pjIOAddress = (unsigned char *)xgi_video_info.vga_base; //XGI_Pr.RelIO = ioremap(pci_resource_start(pdev, 2), 128) + 0x30; - printk("XGIfb: Relocate IO address: %lx [%08lx] \n", (unsigned long)pci_resource_start(pdev, 2), XGI_Pr.RelIO); + printk("XGIfb: Relocate IO address: %lx [%08lx]\n", + (unsigned long)pci_resource_start(pdev, 2), XGI_Pr.RelIO); if (pci_enable_device(pdev)) return -EIO; diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index da8f84fcf5e0..7d4beda828d3 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -127,7 +127,7 @@ BOOLEAN XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension ) PVB_DEVICE_INFO pVBInfo = &VBINF; UCHAR i , temp = 0 , temp1 ; // VBIOSVersion[ 5 ] ; - PUCHAR volatile pVideoMemory; + volatile unsigned char *pVideoMemory; /* ULONG j, k ; */ @@ -141,7 +141,7 @@ BOOLEAN XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension ) pVBInfo->BaseAddr = (ULONG)HwDeviceExtension->pjIOAddress ; - pVideoMemory = ( PUCHAR )pVBInfo->ROMAddr; + pVideoMemory = (unsigned char *)pVBInfo->ROMAddr; // Newdebugcode( 0x99 ) ; @@ -1254,7 +1254,7 @@ void XGINew_DDR_MRS(PVB_DEVICE_INFO pVBInfo) { USHORT data ; - PUCHAR volatile pVideoMemory = ( PUCHAR )pVBInfo->ROMAddr ; + volatile unsigned char *pVideoMemory = (unsigned char *)pVBInfo->ROMAddr; /* SR16 <- 1F,DF,2F,AF */ /* yriver modified SR16 <- 0F,DF,0F,AF */ @@ -1320,7 +1320,7 @@ void XGINew_DDR_MRS(PVB_DEVICE_INFO pVBInfo) /* --------------------------------------------------------------------- */ void XGINew_VerifyMclk( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo) { - PUCHAR pVideoMemory = pVBInfo->FBAddr ; + unsigned char *pVideoMemory = pVBInfo->FBAddr ; UCHAR i , j ; USHORT Temp , SR21 ; @@ -2697,7 +2697,7 @@ void XGINew_InitVBIOSData(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO /* --------------------------------------------------------------------- */ void ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo) { - PUCHAR volatile pVideoMemory = ( PUCHAR )pVBInfo->ROMAddr ; + volatile unsigned char *pVideoMemory = (unsigned char *)pVBInfo->ROMAddr; ULONG i ; UCHAR j , k ; #if 0 @@ -3279,7 +3279,7 @@ void XGINew_SetModeScratch ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_ void XGINew_GetXG21Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) { UCHAR Temp; - PUCHAR volatile pVideoMemory = ( PUCHAR )pVBInfo->ROMAddr ; + volatile unsigned char *pVideoMemory = (unsigned char *)pVBInfo->ROMAddr; pVBInfo->IF_DEF_LVDS = 0 ; diff --git a/drivers/staging/xgifb/vb_struct.h b/drivers/staging/xgifb/vb_struct.h index bb25c0e2785e..1ee619f65978 100644 --- a/drivers/staging/xgifb/vb_struct.h +++ b/drivers/staging/xgifb/vb_struct.h @@ -415,8 +415,8 @@ struct _VB_DEVICE_INFO USHORT NewFlickerMode; USHORT SelectCRT2Rate; - PUCHAR ROMAddr; - PUCHAR FBAddr; + unsigned char *ROMAddr; + unsigned char *FBAddr; ULONG BaseAddr; ULONG RelIO; diff --git a/drivers/staging/xgifb/vb_util.c b/drivers/staging/xgifb/vb_util.c index f83aee7ea90e..0842cb68b834 100644 --- a/drivers/staging/xgifb/vb_util.c +++ b/drivers/staging/xgifb/vb_util.c @@ -13,7 +13,7 @@ void XGINew_SetReg4( ULONG , ULONG ) ; UCHAR XGINew_GetReg1( ULONG , USHORT) ; UCHAR XGINew_GetReg2( ULONG ) ; ULONG XGINew_GetReg3( ULONG ) ; -void XGINew_ClearDAC( PUCHAR ) ; +void XGINew_ClearDAC(unsigned char *) ; void XGINew_SetRegANDOR(ULONG Port,USHORT Index,USHORT DataAND,USHORT DataOR); void XGINew_SetRegOR(ULONG Port,USHORT Index,USHORT DataOR); void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND); diff --git a/drivers/staging/xgifb/vgatypes.h b/drivers/staging/xgifb/vgatypes.h index c1c798562ddd..ec4c83f7a7c4 100644 --- a/drivers/staging/xgifb/vgatypes.h +++ b/drivers/staging/xgifb/vgatypes.h @@ -28,10 +28,6 @@ typedef unsigned short USHORT; typedef unsigned long ULONG; #endif -#ifndef PUCHAR -typedef UCHAR *PUCHAR; -#endif - #ifndef PUSHORT typedef USHORT *PUSHORT; #endif @@ -126,25 +122,25 @@ struct _XGI_HW_DEVICE_INFO ULONG ulExternalChip; /* NO VB or other video bridge*/ /* if ujVBChipID = VB_CHIP_UNKNOWN, */ - PUCHAR pjVirtualRomBase; /* ROM image */ + unsigned char *pjVirtualRomBase; /* ROM image */ BOOLEAN UseROM; /* Use the ROM image if provided */ PVOID pDevice; - PUCHAR pjVideoMemoryAddress;/* base virtual memory address */ + unsigned char *pjVideoMemoryAddress;/* base virtual memory address */ /* of Linear VGA memory */ ULONG ulVideoMemorySize; /* size, in bytes, of the memory on the board */ - PUCHAR pjIOAddress; /* base I/O address of VGA ports (0x3B0) */ + unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */ - PUCHAR pjCustomizedROMImage; + unsigned char *pjCustomizedROMImage; - PUCHAR pj2ndVideoMemoryAddress; + unsigned char *pj2ndVideoMemoryAddress; ULONG ul2ndVideoMemorySize; - PUCHAR pj2ndIOAddress; + unsigned char *pj2ndIOAddress; UCHAR jChipType; /* Used to Identify Graphics Chip */ /* defined in the data structure type */ /* "XGI_CHIP_TYPE" */ -- 2.30.2