[PATCH 4/4] staging: xgifb: Init uninitialized variables and fixsome style issues

From: Javier Martinez Canillas
Date: Sat Sep 04 2010 - 19:09:34 EST



Signed-off-by: Javier Martinez Canillas <martinez.javier@xxxxxxxxx>
---
drivers/staging/xgifb/vb_setmode.c | 35 +++++++++++++++++------------------
1 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index cf6874b..bcd3083 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -399,21 +399,20 @@ 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 ;
- /* unsigned char *pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress ; */
- struct vb_device_info VBINF;
- struct vb_device_info *pVBInfo = &VBINF;
- pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ;
- pVBInfo->BaseAddr = (unsigned long)HwDeviceExtension->pjIOAddress ;
- pVBInfo->IF_DEF_LVDS = 0 ;
- pVBInfo->IF_DEF_CH7005 = 0 ;
- pVBInfo->IF_DEF_LCDA = 1 ;
- pVBInfo->IF_DEF_CH7017 = 0 ;
- pVBInfo->IF_DEF_CH7007 = 0 ; /* [Billy] 2007/05/14 */
- pVBInfo->IF_DEF_VideoCapture = 0 ;
- pVBInfo->IF_DEF_ScaleLCD = 0 ;
- pVBInfo->IF_DEF_OEMUtil = 0 ;
- pVBInfo->IF_DEF_PWD = 0 ;
+ unsigned short ModeIdIndex = 0;
+ struct vb_device_info VBINF;
+ struct vb_device_info *pVBInfo = &VBINF;
+ pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase;
+ pVBInfo->BaseAddr = (unsigned long)HwDeviceExtension->pjIOAddress;
+ pVBInfo->IF_DEF_LVDS = 0;
+ pVBInfo->IF_DEF_CH7005 = 0;
+ pVBInfo->IF_DEF_LCDA = 1;
+ pVBInfo->IF_DEF_CH7017 = 0;
+ pVBInfo->IF_DEF_CH7007 = 0; /* [Billy] 2007/05/14 */
+ pVBInfo->IF_DEF_VideoCapture = 0;
+ pVBInfo->IF_DEF_ScaleLCD = 0;
+ pVBInfo->IF_DEF_OEMUtil = 0;
+ pVBInfo->IF_DEF_PWD = 0;


if ( HwDeviceExtension->jChipType >= XG20 ) /* kuku 2004/06/25 */
@@ -4444,9 +4443,9 @@ unsigned char XGI_SetCRT2Group301(unsigned short ModeNo,
struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
- unsigned short tempbx ,
- ModeIdIndex ,
- RefreshRateTableIndex ;
+ unsigned short tempbx,
+ ModeIdIndex = 0,
+ RefreshRateTableIndex;

tempbx=pVBInfo->VBInfo ;
pVBInfo->SetFlag |= ProgrammingCRT2 ;
--
1.7.0.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/