diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-08 01:01:14 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-08 01:01:14 -0300 |
commit | e5fd91f1ef340da553f7a79da9540c3db711c937 (patch) | |
tree | b11842027dc6641da63f4bcc524f8678263304a3 /drivers/staging/xgifb/vb_setmode.c | |
parent | 2a9b0348e685a63d97486f6749622b61e9e3292f (diff) |
Linux-libre 4.2-gnu
Diffstat (limited to 'drivers/staging/xgifb/vb_setmode.c')
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index a47395e92..c886dd289 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -940,7 +940,7 @@ static void XGI_SetCRT1FIFO(struct xgi_hw_device_info *HwDeviceExtension, data = xgifb_reg_get(pVBInfo->P3c4, 0x3D); data &= 0xfe; - xgifb_reg_set(pVBInfo->P3c4, 0x3D, data); /* diable auto-threshold */ + xgifb_reg_set(pVBInfo->P3c4, 0x3D, data); /* disable auto-threshold */ xgifb_reg_set(pVBInfo->P3c4, 0x08, 0x34); data = xgifb_reg_get(pVBInfo->P3c4, 0x09); @@ -1081,24 +1081,17 @@ static void XGI_WriteDAC(unsigned short dl, unsigned short dh, struct vb_device_info *pVBInfo) { - unsigned short temp, bh, bl; + unsigned short bh, bl; bh = ah; bl = al; if (dl != 0) { - temp = bh; - bh = dh; - dh = temp; - if (dl == 1) { - temp = bl; - bl = dh; - dh = temp; - } else { - temp = bl; - bl = bh; - bh = temp; - } + swap(bh, dh); + if (dl == 1) + swap(bl, dh); + else + swap(bl, bh); } outb((unsigned short) dh, pVBInfo->P3c9); outb((unsigned short) bh, pVBInfo->P3c9); |