Commit 64746c0c authored by Fabian Frederick's avatar Fabian Frederick Committed by Greg Kroah-Hartman

staging: xgifb: use swap() in XGI_WriteDAC()

Use kernel.h macro definition.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3786a0f2
...@@ -1081,24 +1081,17 @@ static void XGI_WriteDAC(unsigned short dl, ...@@ -1081,24 +1081,17 @@ static void XGI_WriteDAC(unsigned short dl,
unsigned short dh, unsigned short dh,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short temp, bh, bl; unsigned short bh, bl;
bh = ah; bh = ah;
bl = al; bl = al;
if (dl != 0) { if (dl != 0) {
temp = bh; swap(bh, dh);
bh = dh; if (dl == 1)
dh = temp; swap(bl, dh);
if (dl == 1) { else
temp = bl; swap(bl, bh);
bl = dh;
dh = temp;
} else {
temp = bl;
bl = bh;
bh = temp;
}
} }
outb((unsigned short) dh, pVBInfo->P3c9); outb((unsigned short) dh, pVBInfo->P3c9);
outb((unsigned short) bh, pVBInfo->P3c9); outb((unsigned short) bh, pVBInfo->P3c9);
......
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