Commit 8922967e authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman

Staging: xgifb: fix lots of sparse warnings

Fix many sparse warnings about data or functions being static.
Fix many sparse warnings about data or functions not being used
  (put them inside #if 0/#endif blocks).
Fix sparse warnings about 0 being used for NULL.
Fixed a small bit of source formatting when those lines were being
  modified anyway, but there is still lots of this yet to be done.
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Cc: devel@driverdev.osuosl.org
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6a4ca039
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
/* TW: BR(16)+2 = 0x8242 */ /* TW: BR(16)+2 = 0x8242 */
int xgiCmdQueLen; static int xgiCmdQueLen;
#define XGI300Idle \ #define XGI300Idle \
{ \ { \
...@@ -488,6 +488,7 @@ int xgiCmdQueLen; ...@@ -488,6 +488,7 @@ int xgiCmdQueLen;
int XGIfb_initaccel(void); int XGIfb_initaccel(void);
void XGIfb_syncaccel(void); void XGIfb_syncaccel(void);
int fbcon_XGI_sync(struct fb_info *info);
extern struct video_info xgi_video_info; extern struct video_info xgi_video_info;
......
...@@ -350,20 +350,17 @@ static int enable_dstn = 0; ...@@ -350,20 +350,17 @@ static int enable_dstn = 0;
static int XGIfb_ypan = -1; static int XGIfb_ypan = -1;
int XGIfb_accel = 0;
static int XGIfb_hwcursor_size = 0; static int XGIfb_hwcursor_size = 0;
static int XGIfb_CRT2_write_enable = 0; static int XGIfb_CRT2_write_enable = 0;
int XGIfb_crt2type = -1; /* TW: CRT2 type (for overriding autodetection) */ static int XGIfb_crt2type = -1; /* TW: CRT2 type (for overriding autodetection) */
int XGIfb_tvplug = -1; /* PR: Tv plug type (for overriding autodetection) */ static int XGIfb_tvplug = -1; /* PR: Tv plug type (for overriding autodetection) */
int XGIfb_queuemode = -1; /* TW: Use MMIO queue mode by default (310/325 series only) */ static int XGIfb_queuemode = -1; /* TW: Use MMIO queue mode by default (310/325 series only) */
unsigned char XGIfb_detectedpdc = 0; static unsigned char XGIfb_detectedpdc = 0;
unsigned char XGIfb_detectedlcda = 0xff; static unsigned char XGIfb_detectedlcda = 0xff;
...@@ -372,10 +369,10 @@ unsigned char XGIfb_detectedlcda = 0xff; ...@@ -372,10 +369,10 @@ unsigned char XGIfb_detectedlcda = 0xff;
/* XGIfb_info XGIfbinfo; */ /* XGIfb_info XGIfbinfo; */
/* TW: Hardware extension; contains data on hardware */ /* TW: Hardware extension; contains data on hardware */
struct xgi_hw_device_info XGIhw_ext; static struct xgi_hw_device_info XGIhw_ext;
/* TW: XGI private structure */ /* TW: XGI private structure */
struct vb_device_info XGI_Pr; static struct vb_device_info XGI_Pr;
/* card parameters */ /* card parameters */
static unsigned long XGIfb_mmio_size = 0; static unsigned long XGIfb_mmio_size = 0;
...@@ -392,7 +389,7 @@ typedef enum _XGI_CMDTYPE { ...@@ -392,7 +389,7 @@ typedef enum _XGI_CMDTYPE {
/* mode table */ /* mode table */
/* NOT const - will be patched for 1280x960 mode number chaos reasons */ /* NOT const - will be patched for 1280x960 mode number chaos reasons */
struct _XGIbios_mode { static struct _XGIbios_mode {
char name[15]; char name[15];
u8 mode_no; u8 mode_no;
u16 vesa_mode_no_1; /* "XGI defined" VESA mode number */ u16 vesa_mode_no_1; /* "XGI defined" VESA mode number */
...@@ -491,17 +488,17 @@ static int xgifb_mode_idx = 1; ...@@ -491,17 +488,17 @@ static int xgifb_mode_idx = 1;
#else #else
static int xgifb_mode_idx = -1; /* Use a default mode if we are inside the kernel */ static int xgifb_mode_idx = -1; /* Use a default mode if we are inside the kernel */
#endif #endif
u8 XGIfb_mode_no = 0; static u8 XGIfb_mode_no = 0;
u8 XGIfb_rate_idx = 0; static u8 XGIfb_rate_idx = 0;
/* TW: CR36 evaluation */ /* TW: CR36 evaluation */
const unsigned short XGI300paneltype[] = static const unsigned short XGI300paneltype[] =
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, { LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768, LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768,
LCD_1024x768, LCD_1024x768, LCD_1024x768, LCD_1024x768, LCD_1024x768, LCD_1024x768,
LCD_1024x768, LCD_1024x768, LCD_1024x768, LCD_1024x768 }; LCD_1024x768, LCD_1024x768, LCD_1024x768, LCD_1024x768 };
const unsigned short XGI310paneltype[] = static const unsigned short XGI310paneltype[] =
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, { LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
LCD_1152x768, LCD_1400x1050,LCD_1280x768, LCD_1600x1200, LCD_1152x768, LCD_1400x1050,LCD_1280x768, LCD_1600x1200,
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#include "XGI_main.h" #include "XGI_main.h"
#include "vb_util.h" #include "vb_util.h"
int XGIfb_accel = 0;
#define Index_CR_GPIO_Reg1 0x48 #define Index_CR_GPIO_Reg1 0x48
#define Index_CR_GPIO_Reg2 0x49 #define Index_CR_GPIO_Reg2 0x49
...@@ -161,8 +163,9 @@ struct video_info xgi_video_info; ...@@ -161,8 +163,9 @@ struct video_info xgi_video_info;
/* --------------- Hardware Access Routines -------------------------- */ /* --------------- Hardware Access Routines -------------------------- */
int static int
XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr, struct xgi_hw_device_info *HwDeviceExtension, XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
struct xgi_hw_device_info *HwDeviceExtension,
unsigned char modeno, unsigned char rateindex) unsigned char modeno, unsigned char rateindex)
{ {
unsigned short ModeNo = modeno; unsigned short ModeNo = modeno;
...@@ -196,8 +199,9 @@ XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr, struct xgi_hw_device_in ...@@ -196,8 +199,9 @@ XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr, struct xgi_hw_device_in
return(Clock); return(Clock);
} }
int static int
XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, struct xgi_hw_device_info *HwDeviceExtension, XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
struct xgi_hw_device_info *HwDeviceExtension,
unsigned char modeno, unsigned char rateindex, unsigned char modeno, unsigned char rateindex,
u32 *left_margin, u32 *right_margin, u32 *left_margin, u32 *right_margin,
u32 *upper_margin, u32 *lower_margin, u32 *upper_margin, u32 *lower_margin,
...@@ -377,7 +381,7 @@ XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, struct xgi_hw_device_inf ...@@ -377,7 +381,7 @@ XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, struct xgi_hw_device_inf
void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr) static void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr)
{ {
XGI_Pr->RelIO = BaseAddr; XGI_Pr->RelIO = BaseAddr;
XGI_Pr->P3c4 = BaseAddr + 0x14; XGI_Pr->P3c4 = BaseAddr + 0x14;
...@@ -570,7 +574,7 @@ static void XGIfb_search_vesamode(unsigned int vesamode) ...@@ -570,7 +574,7 @@ static void XGIfb_search_vesamode(unsigned int vesamode)
if(!j) printk(KERN_INFO "XGIfb: Invalid VESA mode 0x%x'\n", vesamode); if(!j) printk(KERN_INFO "XGIfb: Invalid VESA mode 0x%x'\n", vesamode);
} }
int XGIfb_GetXG21LVDSData(void) static int XGIfb_GetXG21LVDSData(void)
{ {
u8 tmp; u8 tmp;
unsigned char *pData; unsigned char *pData;
...@@ -2057,9 +2061,9 @@ static int XGIfb_heap_init(void) ...@@ -2057,9 +2061,9 @@ static int XGIfb_heap_init(void)
int agp_enabled = 1; int agp_enabled = 1;
u32 agp_size; u32 agp_size;
unsigned long *cmdq_baseport = 0; unsigned long *cmdq_baseport = NULL;
unsigned long *read_port = 0; unsigned long *read_port = NULL;
unsigned long *write_port = 0; unsigned long *write_port = NULL;
XGI_CMDTYPE cmd_type; XGI_CMDTYPE cmd_type;
#ifndef AGPOFF #ifndef AGPOFF
struct agp_kern_info *agp_info; struct agp_kern_info *agp_info;
...@@ -2827,7 +2831,7 @@ XGIINITSTATIC int __init XGIfb_setup(char *options) ...@@ -2827,7 +2831,7 @@ XGIINITSTATIC int __init XGIfb_setup(char *options)
static unsigned char VBIOS_BUF[65535]; static unsigned char VBIOS_BUF[65535];
unsigned char *attempt_map_rom(struct pci_dev *dev, void *copy_address) static unsigned char *attempt_map_rom(struct pci_dev *dev, void *copy_address)
{ {
u32 rom_size = 0; u32 rom_size = 0;
u32 rom_address = 0; u32 rom_address = 0;
...@@ -2872,7 +2876,8 @@ unsigned char *attempt_map_rom(struct pci_dev *dev, void *copy_address) ...@@ -2872,7 +2876,8 @@ unsigned char *attempt_map_rom(struct pci_dev *dev, void *copy_address)
return copy_address; return copy_address;
} }
int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) static int __devinit xgifb_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{ {
u16 reg16; u16 reg16;
u8 reg, reg1; u8 reg, reg1;
...@@ -3641,7 +3646,7 @@ MODULE_PARM_DESC(nocrt2rate, ...@@ -3641,7 +3646,7 @@ MODULE_PARM_DESC(nocrt2rate,
int __init xgifb_init_module(void) static int __init xgifb_init_module(void)
{ {
printk("\nXGIfb_init_module"); printk("\nXGIfb_init_module");
if(mode) if(mode)
......
...@@ -44,7 +44,7 @@ unsigned char XGI_Is301LV(struct vb_device_info *); ...@@ -44,7 +44,7 @@ unsigned char XGI_Is301LV(struct vb_device_info *);
/* Output : */ /* Output : */
/* Description : */ /* Description : */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
unsigned char XGINew_Is301B(struct vb_device_info *pVBInfo) static unsigned char XGINew_Is301B(struct vb_device_info *pVBInfo)
{ {
unsigned short flag ; unsigned short flag ;
...@@ -816,7 +816,8 @@ unsigned char XGINew_SenseHiTV(struct xgi_hw_device_info *HwDeviceExtension, str ...@@ -816,7 +816,8 @@ unsigned char XGINew_SenseHiTV(struct xgi_hw_device_info *HwDeviceExtension, str
; DX: PAnel V. resolution ; DX: PAnel V. resolution
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
*/ */
void XGI_XG21Fun14Sub70(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments) static void XGI_XG21Fun14Sub70(struct vb_device_info *pVBInfo,
PX86_REGS pBiosArguments)
{ {
unsigned short ModeIdIndex; unsigned short ModeIdIndex;
...@@ -859,7 +860,8 @@ void XGI_XG21Fun14Sub70(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments ...@@ -859,7 +860,8 @@ void XGI_XG21Fun14Sub70(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments
; ;
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
*/ */
void XGI_XG21Fun14Sub71(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments) static void XGI_XG21Fun14Sub71(struct vb_device_info *pVBInfo,
PX86_REGS pBiosArguments)
{ {
unsigned short EModeCount; unsigned short EModeCount;
...@@ -905,7 +907,8 @@ void XGI_XG21Fun14Sub71(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments ...@@ -905,7 +907,8 @@ void XGI_XG21Fun14Sub71(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments
; ;
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
*/ */
void XGI_XG21Fun14Sub72(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments) static void XGI_XG21Fun14Sub72(struct vb_device_info *pVBInfo,
PX86_REGS pBiosArguments)
{ {
unsigned short ModeIdIndex, resindex; unsigned short ModeIdIndex, resindex;
unsigned short ModeNo; unsigned short ModeNo;
...@@ -964,7 +967,8 @@ void XGI_XG21Fun14Sub72(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments ...@@ -964,7 +967,8 @@ void XGI_XG21Fun14Sub72(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments
; BX[6]: *Value1 D[6] Panel H. Polarity ; BX[6]: *Value1 D[6] Panel H. Polarity
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
*/ */
void XGI_XG21Fun14Sub73(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments) static void XGI_XG21Fun14Sub73(struct vb_device_info *pVBInfo,
PX86_REGS pBiosArguments)
{ {
unsigned char Select; unsigned char Select;
......
This diff is collapsed.
...@@ -124,6 +124,7 @@ void XGI_SetLCDAGroup(unsigned short ModeNo, unsigned short ModeIdIndex, str ...@@ -124,6 +124,7 @@ void XGI_SetLCDAGroup(unsigned short ModeNo, unsigned short ModeIdIndex, str
void XGI_GetLVDSResInfo(unsigned short ModeNo, unsigned short ModeIdIndex, void XGI_GetLVDSResInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo); struct vb_device_info *pVBInfo);
void XGI_GetLVDSData(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefreshRateTableIndex, struct vb_device_info *pVBInfo); void XGI_GetLVDSData(unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefreshRateTableIndex, struct vb_device_info *pVBInfo);
unsigned short XGI_GetLVDSOEMTableIndex(struct vb_device_info *pVBInfo);
void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex, void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
...@@ -191,7 +192,7 @@ extern void ReadVBIOSTablData(unsigned char ChipType, struct vb_device_info *pVB ...@@ -191,7 +192,7 @@ extern void ReadVBIOSTablData(unsigned char ChipType, struct vb_device_info *pVB
/* unsigned short XGINew_flag_clearbuffer; 0: no clear frame buffer 1:clear frame buffer */ /* unsigned short XGINew_flag_clearbuffer; 0: no clear frame buffer 1:clear frame buffer */
unsigned short XGINew_MDA_DAC[] = { static unsigned short XGINew_MDA_DAC[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15,
0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15,
...@@ -201,7 +202,7 @@ unsigned short XGINew_MDA_DAC[] = { ...@@ -201,7 +202,7 @@ unsigned short XGINew_MDA_DAC[] = {
0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15,
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F}; 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F};
unsigned short XGINew_CGA_DAC[] = { static unsigned short XGINew_CGA_DAC[] = {
0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15,
0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15, 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15,
0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F,
...@@ -211,7 +212,7 @@ unsigned short XGINew_CGA_DAC[] = { ...@@ -211,7 +212,7 @@ unsigned short XGINew_CGA_DAC[] = {
0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F,
0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F}; 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F};
unsigned short XGINew_EGA_DAC[] = { static unsigned short XGINew_EGA_DAC[] = {
0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x05, 0x15, 0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x05, 0x15,
0x20, 0x30, 0x24, 0x34, 0x21, 0x31, 0x25, 0x35, 0x20, 0x30, 0x24, 0x34, 0x21, 0x31, 0x25, 0x35,
0x08, 0x18, 0x0C, 0x1C, 0x09, 0x19, 0x0D, 0x1D, 0x08, 0x18, 0x0C, 0x1C, 0x09, 0x19, 0x0D, 0x1D,
...@@ -221,7 +222,7 @@ unsigned short XGINew_EGA_DAC[] = { ...@@ -221,7 +222,7 @@ unsigned short XGINew_EGA_DAC[] = {
0x0A, 0x1A, 0x0E, 0x1E, 0x0B, 0x1B, 0x0F, 0x1F, 0x0A, 0x1A, 0x0E, 0x1E, 0x0B, 0x1B, 0x0F, 0x1F,
0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F}; 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F};
unsigned short XGINew_VGA_DAC[] = { static unsigned short XGINew_VGA_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, 0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F,
0x00, 0x05, 0x08, 0x0B, 0x0E, 0x11, 0x14, 0x18, 0x00, 0x05, 0x08, 0x0B, 0x0E, 0x11, 0x14, 0x18,
...@@ -2947,7 +2948,7 @@ void XGI_SetLVDSRegs(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2947,7 +2948,7 @@ void XGI_SetLVDSRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
LCDPtr = (struct XGI330_LCDDataDesStruct *)XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo); LCDPtr = (struct XGI330_LCDDataDesStruct *)XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex, RefreshRateTableIndex, pVBInfo);
} }
if ( ( pVBInfo->IF_DEF_OEMUtil == 0 ) || ( LCDPtr == 0 ) ) if ( ( pVBInfo->IF_DEF_OEMUtil == 0 ) || ( LCDPtr == NULL ) )
{ {
tempbx = 3 ; tempbx = 3 ;
if ( pVBInfo->LCDInfo & EnableScalingLCD ) if ( pVBInfo->LCDInfo & EnableScalingLCD )
...@@ -4058,13 +4059,15 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo, ...@@ -4058,13 +4059,15 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo,
/* win2000 MM adapter not support standard mode! */ /* win2000 MM adapter not support standard mode! */
#if 0
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
/* Function : */ /* Function : */
/* Input : */ /* Input : */
/* Output : */ /* Output : */
/* Description : */ /* Description : */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
unsigned char XGINew_CheckMemorySize(struct xgi_hw_device_info *HwDeviceExtension, static unsigned char XGINew_CheckMemorySize(
struct xgi_hw_device_info *HwDeviceExtension,
unsigned short ModeNo, unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
...@@ -4141,7 +4144,7 @@ unsigned char XGINew_CheckMemorySize(struct xgi_hw_device_info *HwDeviceExtensio ...@@ -4141,7 +4144,7 @@ unsigned char XGINew_CheckMemorySize(struct xgi_hw_device_info *HwDeviceExtensio
else else
return 1; return 1;
} }
#endif
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
/* Function : XGINew_IsLowResolution */ /* Function : XGINew_IsLowResolution */
...@@ -4415,28 +4418,20 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo) ...@@ -4415,28 +4418,20 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo)
} }
#if 0
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
/* Function : XGI_WaitDisplay */ /* Function : XGI_WaitDisplay */
/* Input : */ /* Input : */
/* Output : */ /* Output : */
/* Description : */ /* Description : */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
void XGI_WaitDisplay(struct vb_device_info *pVBInfo) static void XGI_WaitDisplay(struct vb_device_info *pVBInfo)
{ {
while( !( XGINew_GetReg2( pVBInfo->P3da ) & 0x01 ) ) ; while( !( XGINew_GetReg2( pVBInfo->P3da ) & 0x01 ) ) ;
while( XGINew_GetReg2( pVBInfo->P3da ) & 0x01 ) ; while( XGINew_GetReg2( pVBInfo->P3da ) & 0x01 ) ;
} }
#endif
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
...@@ -5139,7 +5134,7 @@ void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0, ...@@ -5139,7 +5134,7 @@ void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0,
/* Output : */ /* Output : */
/* Description : */ /* Description : */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
void XGI_SetCRT2Offset(unsigned short ModeNo, static void XGI_SetCRT2Offset(unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short RefreshRateTableIndex,
struct xgi_hw_device_info *HwDeviceExtension, struct xgi_hw_device_info *HwDeviceExtension,
...@@ -5218,7 +5213,7 @@ unsigned short XGI_GetOffset(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -5218,7 +5213,7 @@ unsigned short XGI_GetOffset(unsigned short ModeNo, unsigned short ModeIdIndex,
/* Output : */ /* Output : */
/* Description : */ /* Description : */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
void XGI_SetCRT2FIFO(struct vb_device_info *pVBInfo) static void XGI_SetCRT2FIFO(struct vb_device_info *pVBInfo)
{ {
XGINew_SetReg1( pVBInfo->Part1Port , 0x01 , 0x3B ) ; /* threshold high ,disable auto threshold */ XGINew_SetReg1( pVBInfo->Part1Port , 0x01 , 0x3B ) ; /* threshold high ,disable auto threshold */
XGINew_SetRegANDOR( pVBInfo->Part1Port , 0x02 , ~( 0x3F ) , 0x04 ) ; /* threshold low default 04h */ XGINew_SetRegANDOR( pVBInfo->Part1Port , 0x02 , ~( 0x3F ) , 0x04 ) ; /* threshold low default 04h */
...@@ -7143,7 +7138,7 @@ void *XGI_GetLcdPtr(unsigned short BX, ...@@ -7143,7 +7138,7 @@ void *XGI_GetLcdPtr(unsigned short BX,
modeflag , modeflag ,
table ; table ;
struct XGI330_LCDDataTablStruct *tempdi = 0 ; struct XGI330_LCDDataTablStruct *tempdi = NULL;
tempbx = BX; tempbx = BX;
...@@ -7224,14 +7219,14 @@ void *XGI_GetLcdPtr(unsigned short BX, ...@@ -7224,14 +7219,14 @@ void *XGI_GetLcdPtr(unsigned short BX,
case 7: case 7:
case 8: case 8:
case 9: case 9:
tempdi = 0 ; tempdi = NULL;
break ; break ;
default: default:
break ; break ;
} }
if ( tempdi == 0x00 ) /* OEMUtil */ if ( tempdi == NULL ) /* OEMUtil */
return 0 ; return NULL;
table = tempbx ; table = tempbx ;
i = 0 ; i = 0 ;
...@@ -7625,7 +7620,7 @@ void *XGI_GetLcdPtr(unsigned short BX, ...@@ -7625,7 +7620,7 @@ void *XGI_GetLcdPtr(unsigned short BX,
break ; break ;
} }
} }
return 0 ; return NULL;
} }
...@@ -7641,7 +7636,7 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, ...@@ -7641,7 +7636,7 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short i , tempdx , tempbx , tempal , modeflag , table ; unsigned short i , tempdx , tempbx , tempal , modeflag , table ;
struct XGI330_TVDataTablStruct *tempdi = 0 ; struct XGI330_TVDataTablStruct *tempdi = NULL;
tempbx = BX ; tempbx = BX ;
...@@ -7662,14 +7657,14 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, ...@@ -7662,14 +7657,14 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
switch( tempbx ) switch( tempbx )
{ {
case 0: case 0:
tempdi = 0 ; /*EPLCHTVCRT1Ptr_H;*/ tempdi = NULL; /*EPLCHTVCRT1Ptr_H;*/
if ( pVBInfo->IF_DEF_CH7007 == 1 ) if ( pVBInfo->IF_DEF_CH7007 == 1 )
{ {
tempdi = XGI_EPLCHTVCRT1Ptr; tempdi = XGI_EPLCHTVCRT1Ptr;
} }
break ; break ;
case 1: case 1:
tempdi = 0 ; /*EPLCHTVCRT1Ptr_V;*/ tempdi = NULL; /*EPLCHTVCRT1Ptr_V;*/
if ( pVBInfo->IF_DEF_CH7007 == 1 ) if ( pVBInfo->IF_DEF_CH7007 == 1 )
{ {
tempdi = XGI_EPLCHTVCRT1Ptr; tempdi = XGI_EPLCHTVCRT1Ptr;
...@@ -7679,13 +7674,13 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, ...@@ -7679,13 +7674,13 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
tempdi = XGI_EPLCHTVDataPtr ; tempdi = XGI_EPLCHTVDataPtr ;
break ; break ;
case 3: case 3:
tempdi = 0 ; tempdi = NULL;
break ; break ;
case 4: case 4:
tempdi = XGI_TVDataTable ; tempdi = XGI_TVDataTable ;
break ; break ;
case 5: case 5:
tempdi = 0 ; tempdi = NULL;
break ; break ;
case 6: case 6:
tempdi = XGI_EPLCHTVRegPtr ; tempdi = XGI_EPLCHTVRegPtr ;
...@@ -7694,8 +7689,8 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, ...@@ -7694,8 +7689,8 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
break ; break ;
} }
if ( tempdi == 0x00 ) /* OEMUtil */ if ( tempdi == NULL ) /* OEMUtil */
return( 0 ) ; return NULL;
tempdx = pVBInfo->TVInfo ; tempdx = pVBInfo->TVInfo ;
...@@ -7793,7 +7788,7 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, ...@@ -7793,7 +7788,7 @@ void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
else if( table == 0x06 ) else if( table == 0x06 )
{ {
} }
return( 0 ) ; return NULL;
} }
...@@ -7913,7 +7908,7 @@ void XGI_SetPanelPower(unsigned short tempah, unsigned short tempbl, struct vb_d ...@@ -7913,7 +7908,7 @@ void XGI_SetPanelPower(unsigned short tempah, unsigned short tempbl, struct vb_d
XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x11 , tempbl , tempah ) ; XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x11 , tempbl , tempah ) ;
} }
unsigned char XG21GPIODataTransfer(unsigned char ujDate) static unsigned char XG21GPIODataTransfer(unsigned char ujDate)
{ {
unsigned char ujRet = 0; unsigned char ujRet = 0;
unsigned char i = 0; unsigned char i = 0;
......
This diff is collapsed.
...@@ -170,7 +170,7 @@ void XGINew_SetRegOR( unsigned long Port , unsigned short Index , unsigned short ...@@ -170,7 +170,7 @@ void XGINew_SetRegOR( unsigned long Port , unsigned short Index , unsigned short
XGINew_SetReg1( Port , Index , temp ) ; XGINew_SetReg1( Port , Index , temp ) ;
} }
#if 0
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
/* Function : NewDelaySecond */ /* Function : NewDelaySecond */
/* Input : */ /* Input : */
...@@ -190,7 +190,6 @@ void NewDelaySeconds( int seconds ) ...@@ -190,7 +190,6 @@ void NewDelaySeconds( int seconds )
} }
} }
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
/* Function : Newdebugcode */ /* Function : Newdebugcode */
/* Input : */ /* Input : */
...@@ -203,6 +202,4 @@ void Newdebugcode(unsigned char code) ...@@ -203,6 +202,4 @@ void Newdebugcode(unsigned char code)
/* OutPortByte ( 0x300 , code ) ; */ /* OutPortByte ( 0x300 , code ) ; */
/* NewDelaySeconds( 0x3 ) ; */ /* NewDelaySeconds( 0x3 ) ; */
} }
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment