summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2014-09-05 17:09:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-06 21:48:19 -0700
commit9c8c8315144a8f14d3e5d2f6ad2d9104eed5c7d7 (patch)
tree8eb395c4fcef767f080c32c2ab67724f362df438 /drivers
parent588a12d789e1a9b8193465c09f32024c0d43a849 (diff)
staging: xgifb: remove unnecessary else
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c10
-rw-r--r--drivers/staging/xgifb/vb_init.c50
-rw-r--r--drivers/staging/xgifb/vb_setmode.c3
3 files changed, 26 insertions, 37 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index f82f0574bbdc..be7778b59118 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -588,13 +588,11 @@ static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info,
}
i++;
}
- if (xgifb_info->rate_idx > 0) {
+ if (xgifb_info->rate_idx > 0)
return xgifb_info->rate_idx;
- } else {
- pr_info("Unsupported rate %d for %dx%d\n",
- rate, xres, yres);
- return 0;
- }
+ pr_info("Unsupported rate %d for %dx%d\n",
+ rate, xres, yres);
+ return 0;
}
static void XGIfb_search_tvstd(const char *name)
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index ff210ddcbf9e..2b233af8eb80 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -63,14 +63,13 @@ XGINew_GetXG20DRAMType(struct xgi_hw_device_info *HwDeviceExtension,
/* ~HOTPLUG_SUPPORT */
xgifb_reg_or(pVBInfo->P3d4, 0xB4, 0x02);
return data;
- } else {
- data = xgifb_reg_get(pVBInfo->P3d4, 0x97) & 0x01;
+ }
+ data = xgifb_reg_get(pVBInfo->P3d4, 0x97) & 0x01;
- if (data == 1)
- data++;
+ if (data == 1)
+ data++;
- return data;
- }
+ return data;
}
static void XGINew_DDR1x_MRS_340(unsigned long P3c4,
@@ -578,9 +577,8 @@ static unsigned char XGINew_CheckFrequence(struct vb_device_info *pVBInfo)
data = xgifb_reg_get(pVBInfo->P3c4, 0x39);
data = (data & 0x02) >> 1;
return data;
- } else {
- return data & 0x01;
}
+ return data & 0x01;
}
static void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension,
@@ -637,10 +635,9 @@ static void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension,
if (XGINew_ReadWriteRest(23, 22, pVBInfo) == 1)
return;
- else
- xgifb_reg_set(pVBInfo->P3c4,
- 0x13,
- 0x31);
+ xgifb_reg_set(pVBInfo->P3c4,
+ 0x13,
+ 0x31);
udelay(15);
}
@@ -687,10 +684,11 @@ static void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension,
if (XGINew_ReadWriteRest(22, 21, pVBInfo) == 1)
return;
- else /* (0x31:12x8x2) 22bit + 1 rank */
- xgifb_reg_set(pVBInfo->P3c4,
- 0x13,
- 0x31);
+
+ /* (0x31:12x8x2) 22bit + 1 rank */
+ xgifb_reg_set(pVBInfo->P3c4,
+ 0x13,
+ 0x31);
udelay(15);
}
}
@@ -729,10 +727,8 @@ static void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension,
if (XGINew_ReadWriteRest(23, 22, pVBInfo) == 1)
return;
- else {
- xgifb_reg_set(pVBInfo->P3c4, 0x13, 0x21);
- xgifb_reg_set(pVBInfo->P3c4, 0x14, 0x30);
- }
+ xgifb_reg_set(pVBInfo->P3c4, 0x13, 0x21);
+ xgifb_reg_set(pVBInfo->P3c4, 0x14, 0x30);
} else { /* DDR */
pVBInfo->ram_bus = 64; /* 64 bits */
pVBInfo->ram_channel = 1; /* 1 channels */
@@ -741,10 +737,8 @@ static void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension,
if (XGINew_ReadWriteRest(24, 23, pVBInfo) == 1)
return;
- else {
- xgifb_reg_set(pVBInfo->P3c4, 0x13, 0x21);
- xgifb_reg_set(pVBInfo->P3c4, 0x14, 0x42);
- }
+ xgifb_reg_set(pVBInfo->P3c4, 0x13, 0x21);
+ xgifb_reg_set(pVBInfo->P3c4, 0x14, 0x42);
}
break;
@@ -781,12 +775,10 @@ static void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension,
xgifb_reg_set(pVBInfo->P3c4, 0x13, 0xA1);
xgifb_reg_set(pVBInfo->P3c4, 0x14, 0x5A);
- if (XGINew_ReadWriteRest(25, 24, pVBInfo) == 1) {
+ if (XGINew_ReadWriteRest(25, 24, pVBInfo) == 1)
return;
- } else {
- xgifb_reg_set(pVBInfo->P3c4, 0x13, 0x21);
- xgifb_reg_set(pVBInfo->P3c4, 0x14, 0x4A);
- }
+ xgifb_reg_set(pVBInfo->P3c4, 0x13, 0x21);
+ xgifb_reg_set(pVBInfo->P3c4, 0x14, 0x4A);
}
break;
}
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 8795e173cb5a..d5f49d2a8db3 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -3895,8 +3895,7 @@ static struct XGI301C_Tap4TimingStruct const
if (tempax <= tempbx)
return &xgifb_tap4_timing[0];
- else
- Tap4TimingPtr = xgifb_ntsc_525_tap4_timing; /* NTSC */
+ Tap4TimingPtr = xgifb_ntsc_525_tap4_timing; /* NTSC */
if (pVBInfo->TVInfo & TVSetPAL)
Tap4TimingPtr = PALTap4Timing;