Commit fb70b191 authored by Peter Huewe's avatar Peter Huewe Committed by Greg Kroah-Hartman

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: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e99e3d00
...@@ -54,14 +54,12 @@ XGINew_GetXG20DRAMType(struct xgi_hw_device_info *HwDeviceExtension, ...@@ -54,14 +54,12 @@ XGINew_GetXG20DRAMType(struct xgi_hw_device_info *HwDeviceExtension,
udelay(800); udelay(800);
xgifb_reg_or(pVBInfo->P3d4, 0x4A, 0x80); /* Enable GPIOH read */ xgifb_reg_or(pVBInfo->P3d4, 0x4A, 0x80); /* Enable GPIOH read */
/* GPIOF 0:DVI 1:DVO */ /* GPIOF 0:DVI 1:DVO */
temp = xgifb_reg_get(pVBInfo->P3d4, 0x48); data = xgifb_reg_get(pVBInfo->P3d4, 0x48);
/* HOTPLUG_SUPPORT */ /* HOTPLUG_SUPPORT */
/* for current XG20 & XG21, GPIOH is floating, driver will /* for current XG20 & XG21, GPIOH is floating, driver will
* fix DDR temporarily */ * fix DDR temporarily */
if (temp & 0x01) /* DVI read GPIOH */ /* DVI read GPIOH */
data = 1; /* DDRII */ data &= 0x01; /* 1=DDRII, 0=DDR */
else
data = 0; /* DDR */
/* ~HOTPLUG_SUPPORT */ /* ~HOTPLUG_SUPPORT */
xgifb_reg_or(pVBInfo->P3d4, 0xB4, 0x02); xgifb_reg_or(pVBInfo->P3d4, 0xB4, 0x02);
return data; return data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment