summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-09-08 01:49:45 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-08 01:49:45 -0700
commit51973d7fa0a2f2087e640200fda23f6bac71fae2 (patch)
treeae5dbb58420b1e7e22a7f49223252ced686fceea /drivers/staging/xgifb
parent675d6409ae5ac0816af5e672b7030e350408d563 (diff)
downloadop-kernel-dev-51973d7fa0a2f2087e640200fda23f6bac71fae2.zip
op-kernel-dev-51973d7fa0a2f2087e640200fda23f6bac71fae2.tar.gz
Staging: xgifb: revert a warning fix and resolve it properly
Jiri pointed out that the previous compiler warning fix was incorrect as the compiler was properly saying that the variable was not being set. This was due to a #define commenting out all of the logic in the function. This patch reverts Javier's previous one, and properly fixes the issue by making the function actually doing something. Reported-by: Jiri Slaby <jirislaby@gmail.com> Cc: Javier Martinez Canillas <martinez.javier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r--drivers/staging/xgifb/vb_setmode.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 720a592..7016fdd 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -376,7 +376,7 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
unsigned char XGISetModeNew(struct xgi_hw_device_info *HwDeviceExtension,
unsigned short ModeNo)
{
- unsigned short ModeIdIndex = 0;
+ unsigned short ModeIdIndex;
/* unsigned char *pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress; */
struct vb_device_info VBINF;
struct vb_device_info *pVBInfo = &VBINF;
@@ -3512,9 +3512,6 @@ unsigned char XGI_GetLCDInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned char XGI_SearchModeID(unsigned short ModeNo,
unsigned short *ModeIdIndex, struct vb_device_info *pVBInfo)
{
-
-#ifdef LINUX /* chiawen for linux solution */
-
if (ModeNo <= 5)
ModeNo |= 1;
if (ModeNo <= 0x13) {
@@ -3541,8 +3538,6 @@ unsigned char XGI_SearchModeID(unsigned short ModeNo,
}
}
-#endif
-
return 1;
}
@@ -3834,7 +3829,7 @@ unsigned char XGI_SetCRT2Group301(unsigned short ModeNo,
struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
- unsigned short tempbx, ModeIdIndex = 0, RefreshRateTableIndex;
+ unsigned short tempbx, ModeIdIndex, RefreshRateTableIndex;
tempbx = pVBInfo->VBInfo;
pVBInfo->SetFlag |= ProgrammingCRT2;
OpenPOWER on IntegriCloud