Skip to content

Commit

Permalink
Staging: xgifb: Remove XGI_HW_DEVICE_INFO and PXGI_HW_DEVICE_INFO typ…
Browse files Browse the repository at this point in the history
…edefs

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Jun 22, 2010
1 parent 1d9f9a9 commit e4147ab
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 186 deletions.
23 changes: 11 additions & 12 deletions drivers/staging/xgifb/XGI_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ MODULE_DEVICE_TABLE(pci, xgifb_pci_table);
#define BRI_DRAM_SIZE_32MB 0x04
#define BRI_DRAM_SIZE_64MB 0x05

#define HW_DEVICE_EXTENSION XGI_HW_DEVICE_INFO
#define PHW_DEVICE_EXTENSION PXGI_HW_DEVICE_INFO

#define SR_BUFFER_SIZE 5
#define CR_BUFFER_SIZE 5

Expand Down Expand Up @@ -376,7 +373,7 @@ unsigned char XGIfb_detectedlcda = 0xff;
/* XGIfb_info XGIfbinfo; */

/* TW: Hardware extension; contains data on hardware */
HW_DEVICE_EXTENSION XGIhw_ext;
struct xgi_hw_device_info XGIhw_ext;

/* TW: XGI private structure */
VB_DEVICE_INFO XGI_Pr;
Expand Down Expand Up @@ -812,9 +809,9 @@ static int XGIfb_ioctl(struct fb_info *info, unsigned int cmd,

/*
extern int XGIfb_mode_rate_to_dclock(VB_DEVICE_INFO *XGI_Pr,
PXGI_HW_DEVICE_INFO HwDeviceExtension,
struct xgi_hw_device_info *HwDeviceExtension,
unsigned char modeno, unsigned char rateindex);
extern int XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExtension,
extern int XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, struct xgi_hw_device_info *HwDeviceExtension,
unsigned char modeno, unsigned char rateindex,
unsigned int *left_margin, unsigned int *right_margin,
unsigned int *upper_margin, unsigned int *lower_margin,
Expand Down Expand Up @@ -881,20 +878,22 @@ static XGI_OH *XGIfb_poh_free(unsigned long base);
static void XGIfb_free_node(XGI_OH *poh);

/* Internal routines to access PCI configuration space */
unsigned char XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
unsigned long offset, unsigned long set, unsigned long *value);
unsigned char XGIfb_query_VGA_config_space(struct xgi_hw_device_info *pXGIhw_ext,
unsigned long offset,
unsigned long set,
unsigned long *value);
//BOOLEAN XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
// unsigned long offset, unsigned long set, unsigned long *value);


/* Routines from init.c/init301.c */
extern void InitTo330Pointer(unsigned char, PVB_DEVICE_INFO pVBInfo);
extern unsigned char XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension);
extern unsigned char XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension,
unsigned short ModeNo);
extern unsigned char XGIInitNew(struct xgi_hw_device_info *HwDeviceExtension);
extern unsigned char XGISetModeNew(struct xgi_hw_device_info *HwDeviceExtension,
unsigned short ModeNo);
//extern void XGI_SetEnableDstn(VB_DEVICE_INFO *XGI_Pr);
extern void XGI_LongWait(VB_DEVICE_INFO *XGI_Pr);
extern unsigned short XGI_GetRatePtrCRT2(PXGI_HW_DEVICE_INFO pXGIHWDE,
extern unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
unsigned short ModeNo,
unsigned short ModeIdIndex,
PVB_DEVICE_INFO pVBInfo);
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct video_info xgi_video_info;
/* --------------- Hardware Access Routines -------------------------- */

int
XGIfb_mode_rate_to_dclock(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExtension,
XGIfb_mode_rate_to_dclock(VB_DEVICE_INFO *XGI_Pr, struct xgi_hw_device_info *HwDeviceExtension,
unsigned char modeno, unsigned char rateindex)
{
unsigned short ModeNo = modeno;
Expand Down Expand Up @@ -197,7 +197,7 @@ XGIfb_mode_rate_to_dclock(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceEx
}

int
XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExtension,
XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, struct xgi_hw_device_info *HwDeviceExtension,
unsigned char modeno, unsigned char rateindex,
u32 *left_margin, u32 *right_margin,
u32 *upper_margin, u32 *lower_margin,
Expand Down Expand Up @@ -416,7 +416,7 @@ u32 XGIfb_get_reg3(u16 port)
/* ------------ Interface for init & mode switching code ------------- */

unsigned char
XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
XGIfb_query_VGA_config_space(struct xgi_hw_device_info *pXGIhw_ext,
unsigned long offset, unsigned long set, unsigned long *value)
{
static struct pci_dev *pdev = NULL;
Expand Down Expand Up @@ -450,7 +450,7 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
return 1;
}

/*unsigned char XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
/*unsigned char XGIfb_query_north_bridge_space(struct xgi_hw_device_info *pXGIhw_ext,
unsigned long offset, unsigned long set, unsigned long *value)
{
static struct pci_dev *pdev = NULL;
Expand Down Expand Up @@ -2881,7 +2881,7 @@ int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

XGIfb_registered = 0;

memset(&XGIhw_ext, 0, sizeof(HW_DEVICE_EXTENSION));
memset(&XGIhw_ext, 0, sizeof(struct xgi_hw_device_info));
fb_info = framebuffer_alloc(sizeof(struct fb_info), &pdev->dev);
if(!fb_info) return -ENOMEM;

Expand Down
26 changes: 13 additions & 13 deletions drivers/staging/xgifb/vb_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ extern unsigned char XGI330_OutputSelect;
extern unsigned short XGI330_RGBSenseData2;
extern unsigned short XGI330_YCSenseData2;
extern unsigned short XGI330_VideoSenseData2;
void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo );
void XGI_GetSenseStatus(struct xgi_hw_device_info *HwDeviceExtension, PVB_DEVICE_INFO pVBInfo);
unsigned char XGINew_GetPanelID(PVB_DEVICE_INFO pVBInfo);
unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,
unsigned short XGINew_SenseLCD(struct xgi_hw_device_info *,
PVB_DEVICE_INFO pVBInfo);
unsigned char XGINew_GetLCDDDCInfo(PXGI_HW_DEVICE_INFO HwDeviceExtension,
unsigned char XGINew_GetLCDDDCInfo(struct xgi_hw_device_info *HwDeviceExtension,
PVB_DEVICE_INFO pVBInfo);
void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
void XGISetDPMS(struct xgi_hw_device_info *pXGIHWDE,
unsigned long VESA_POWER_STATE);
unsigned char XGINew_BridgeIsEnable(PXGI_HW_DEVICE_INFO, PVB_DEVICE_INFO pVBInfo);
unsigned char XGINew_BridgeIsEnable(struct xgi_hw_device_info *, PVB_DEVICE_INFO pVBInfo);
unsigned char XGINew_Sense(unsigned short tempbx, unsigned short tempcx,
PVB_DEVICE_INFO pVBInfo);
unsigned char XGINew_SenseHiTV(PXGI_HW_DEVICE_INFO HwDeviceExtension,
unsigned char XGINew_SenseHiTV(struct xgi_hw_device_info *HwDeviceExtension,
PVB_DEVICE_INFO pVBInfo);

/**************************************************************
Expand Down Expand Up @@ -135,7 +135,7 @@ unsigned char XGINew_Sense(unsigned short tempbx,
/* Output : */
/* Description : */
/* --------------------------------------------------------------------- */
void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
void XGISetDPMS(struct xgi_hw_device_info *pXGIHWDE,
unsigned long VESA_POWER_STATE)
{
unsigned short ModeNo, ModeIdIndex;
Expand Down Expand Up @@ -359,7 +359,7 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
/* Output : */
/* Description : */
/* --------------------------------------------------------------------- */
void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo)
void XGI_GetSenseStatus(struct xgi_hw_device_info *HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
{
unsigned short tempax = 0 , tempbx , tempcx , temp ,
P2reg0 = 0 , SenseModeNo = 0 , OutputSelect = *pVBInfo->pOutputSelect ,
Expand Down Expand Up @@ -558,7 +558,7 @@ void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO
/* Output : */
/* Description : */
/* --------------------------------------------------------------------- */
unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO HwDeviceExtension,
unsigned short XGINew_SenseLCD(struct xgi_hw_device_info *HwDeviceExtension,
PVB_DEVICE_INFO pVBInfo)
{
/* unsigned short SoftSetting ; */
Expand All @@ -582,7 +582,7 @@ unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO HwDeviceExtension,
/* Output : */
/* Description : */
/* --------------------------------------------------------------------- */
unsigned char XGINew_GetLCDDDCInfo( PXGI_HW_DEVICE_INFO HwDeviceExtension,PVB_DEVICE_INFO pVBInfo)
unsigned char XGINew_GetLCDDDCInfo(struct xgi_hw_device_info *HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
{
unsigned short temp ;

Expand Down Expand Up @@ -708,7 +708,7 @@ unsigned char XGINew_GetPanelID(PVB_DEVICE_INFO pVBInfo )
/* Output : */
/* Description : */
/* --------------------------------------------------------------------- */
unsigned char XGINew_BridgeIsEnable( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_DEVICE_INFO pVBInfo)
unsigned char XGINew_BridgeIsEnable(struct xgi_hw_device_info *HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
{
unsigned short flag ;

Expand All @@ -735,7 +735,7 @@ unsigned char XGINew_BridgeIsEnable( PXGI_HW_DEVICE_INFO HwDeviceExtension ,PVB_
/* Output : */
/* Description : */
/* ------------------------------------------------------ */
unsigned char XGINew_SenseHiTV( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo )
unsigned char XGINew_SenseHiTV(struct xgi_hw_device_info *HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
{
unsigned short tempbx , tempcx , temp , i , tempch;

Expand Down Expand Up @@ -998,7 +998,7 @@ void XGI_XG21Fun14Sub73( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
}


void XGI_XG21Fun14( PXGI_HW_DEVICE_INFO pXGIHWDE, PX86_REGS pBiosArguments)
void XGI_XG21Fun14(struct xgi_hw_device_info *pXGIHWDE, PX86_REGS pBiosArguments)
{
VB_DEVICE_INFO VBINF;
PVB_DEVICE_INFO pVBInfo = &VBINF;
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/xgifb/vb_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ typedef union _X86_REGS {
struct BYTEREGS h;
} X86_REGS, *PX86_REGS;

extern void XGI_XG21Fun14( PXGI_HW_DEVICE_INFO pXGIHWDE, PX86_REGS pBiosArguments);
extern void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
extern void XGI_XG21Fun14(struct xgi_hw_device_info *pXGIHWDE, PX86_REGS pBiosArguments);
extern void XGISetDPMS(struct xgi_hw_device_info *pXGIHWDE,
unsigned long VESA_POWER_STATE);
extern void XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo );
extern void XGINew_SetModeScratch ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) ;
extern void XGI_GetSenseStatus(struct xgi_hw_device_info *HwDeviceExtension, PVB_DEVICE_INFO pVBInfo);
extern void XGINew_SetModeScratch(struct xgi_hw_device_info *HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) ;
extern void ReadVBIOSTablData(unsigned char ChipType,
PVB_DEVICE_INFO pVBInfo);
extern unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,
extern unsigned short XGINew_SenseLCD(struct xgi_hw_device_info *,
PVB_DEVICE_INFO pVBInfo);

#endif
Loading

0 comments on commit e4147ab

Please sign in to comment.