diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-05-18 19:34:15 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-31 10:30:40 +0900 |
commit | 64746c0c6a9a168d1e462903b66ff17705964967 (patch) | |
tree | db9739d5b2d45f29866c5744ba714d55ff914053 /drivers/staging/xgifb | |
parent | 3786a0f2bcb2edceabf4cd62833214e96f298609 (diff) | |
download | linux-64746c0c6a9a168d1e462903b66ff17705964967.tar.gz linux-64746c0c6a9a168d1e462903b66ff17705964967.tar.bz2 linux-64746c0c6a9a168d1e462903b66ff17705964967.zip |
staging: xgifb: use swap() in XGI_WriteDAC()
Use kernel.h macro definition.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 3f7c10e4e277..c886dd2892a4 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -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); |