summaryrefslogtreecommitdiff
path: root/drivers/staging/xgifb
diff options
context:
space:
mode:
authorPeter Huewe <peterhuewe@gmx.de>2013-05-14 01:41:45 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-17 03:02:33 +0400
commitfb70b191ee8fc29264791b0c25ec2925b98bb0e3 (patch)
tree82e0da26aee41be3518b92bfcba608ba3cf12d3e /drivers/staging/xgifb
parente99e3d0018891908985640acc8bd23c8ebabca89 (diff)
downloadlinux-fb70b191ee8fc29264791b0c25ec2925b98bb0e3.tar.xz
staging/xgifb: Remove uneccessary/simply if in XGINew_GetXG20DRAMType
Instead of storing the value in a temp variable, anding it with 1 and assign data conditionally we can assign the value directly. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r--drivers/staging/xgifb/vb_init.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index 19ce5a978cae..9caf12a721df 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -54,14 +54,12 @@ XGINew_GetXG20DRAMType(struct xgi_hw_device_info *HwDeviceExtension,
udelay(800);
xgifb_reg_or(pVBInfo->P3d4, 0x4A, 0x80); /* Enable GPIOH read */
/* GPIOF 0:DVI 1:DVO */
- temp = xgifb_reg_get(pVBInfo->P3d4, 0x48);
+ data = xgifb_reg_get(pVBInfo->P3d4, 0x48);
/* HOTPLUG_SUPPORT */
/* for current XG20 & XG21, GPIOH is floating, driver will
* fix DDR temporarily */
- if (temp & 0x01) /* DVI read GPIOH */
- data = 1; /* DDRII */
- else
- data = 0; /* DDR */
+ /* DVI read GPIOH */
+ data &= 0x01; /* 1=DDRII, 0=DDR */
/* ~HOTPLUG_SUPPORT */
xgifb_reg_or(pVBInfo->P3d4, 0xB4, 0x02);
return data;