mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
staging: xgifb: remove unnecessary else
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
588a12d789
commit
9c8c831514
@ -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)
|
||||
|
@ -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;
|
||||
|
||||
if (data == 1)
|
||||
data++;
|
||||
|
||||
return data;
|
||||
}
|
||||
data = xgifb_reg_get(pVBInfo->P3d4, 0x97) & 0x01;
|
||||
|
||||
if (data == 1)
|
||||
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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user