diff options
author | Peter Huewe <peterhuewe@gmx.de> | 2013-02-04 23:29:43 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-05 19:16:21 (GMT) |
commit | 227dc1156c103b7e073ee81e642e15d7927af828 (patch) | |
tree | 24b1361337334b051f603679d0da45dc73e0c23f /drivers/staging/xgifb/vb_init.c | |
parent | 5056d87a889d1bd7d998070b6827b384ccde487f (diff) | |
download | linux-227dc1156c103b7e073ee81e642e15d7927af828.tar.xz |
staging/xgifb: Replace XGI340_CR6B table with simple if/else
The XGI340_CR6B lookup table consists of the entries
{0xaa, 0xaa, 0xaa, 0xaa} for an index <= 2 and
{0x00, 0x00, 0x00, 0x00} for all other indices.
The only user XGINew_SetDRAMDefaultRegister340 loops over these 4 values
of a line with a for loop and since all entries are the same for each line
we can simply replace the whole lookup table with a simple if/else assignment.
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb/vb_init.c')
-rw-r--r-- | drivers/staging/xgifb/vb_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index dd34570..a778df6 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -429,7 +429,7 @@ static void XGINew_SetDRAMDefaultRegister340( temp2 = 0; for (i = 0; i < 4; i++) { /* CR6B DQS fine tune delay */ - temp = XGI340_CR6B[pVBInfo->ram_type][i]; + temp = (pVBInfo->ram_type <= 2) ? 0xaa : 0x00; for (j = 0; j < 4; j++) { temp1 = ((temp >> (2 * j)) & 0x03) << 2; temp2 |= temp1; |