diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
commit | bac30d1a78d0f11c613968fc8b351a91ed465386 (patch) | |
tree | e52f3c876522a2f6047a6ec1c27df2e8a79486b8 /drivers/video/asiliantfb.c | |
parent | e8222502ee6157e2713da9e0792c21f4ad458d50 (diff) | |
parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/video/asiliantfb.c')
-rw-r--r-- | drivers/video/asiliantfb.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index c924d81f7978..29f9f0dfe3b4 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c | |||
@@ -353,8 +353,6 @@ struct chips_init_reg { | |||
353 | unsigned char data; | 353 | unsigned char data; |
354 | }; | 354 | }; |
355 | 355 | ||
356 | #define N_ELTS(x) (sizeof(x) / sizeof(x[0])) | ||
357 | |||
358 | static struct chips_init_reg chips_init_sr[] = | 356 | static struct chips_init_reg chips_init_sr[] = |
359 | { | 357 | { |
360 | {0x00, 0x03}, /* Reset register */ | 358 | {0x00, 0x03}, /* Reset register */ |
@@ -460,22 +458,22 @@ static void __devinit chips_hw_init(struct fb_info *p) | |||
460 | { | 458 | { |
461 | int i; | 459 | int i; |
462 | 460 | ||
463 | for (i = 0; i < N_ELTS(chips_init_xr); ++i) | 461 | for (i = 0; i < ARRAY_SIZE(chips_init_xr); ++i) |
464 | write_xr(chips_init_xr[i].addr, chips_init_xr[i].data); | 462 | write_xr(chips_init_xr[i].addr, chips_init_xr[i].data); |
465 | write_xr(0x81, 0x12); | 463 | write_xr(0x81, 0x12); |
466 | write_xr(0x82, 0x08); | 464 | write_xr(0x82, 0x08); |
467 | write_xr(0x20, 0x00); | 465 | write_xr(0x20, 0x00); |
468 | for (i = 0; i < N_ELTS(chips_init_sr); ++i) | 466 | for (i = 0; i < ARRAY_SIZE(chips_init_sr); ++i) |
469 | write_sr(chips_init_sr[i].addr, chips_init_sr[i].data); | 467 | write_sr(chips_init_sr[i].addr, chips_init_sr[i].data); |
470 | for (i = 0; i < N_ELTS(chips_init_gr); ++i) | 468 | for (i = 0; i < ARRAY_SIZE(chips_init_gr); ++i) |
471 | write_gr(chips_init_gr[i].addr, chips_init_gr[i].data); | 469 | write_gr(chips_init_gr[i].addr, chips_init_gr[i].data); |
472 | for (i = 0; i < N_ELTS(chips_init_ar); ++i) | 470 | for (i = 0; i < ARRAY_SIZE(chips_init_ar); ++i) |
473 | write_ar(chips_init_ar[i].addr, chips_init_ar[i].data); | 471 | write_ar(chips_init_ar[i].addr, chips_init_ar[i].data); |
474 | /* Enable video output in attribute index register */ | 472 | /* Enable video output in attribute index register */ |
475 | writeb(0x20, mmio_base + 0x780); | 473 | writeb(0x20, mmio_base + 0x780); |
476 | for (i = 0; i < N_ELTS(chips_init_cr); ++i) | 474 | for (i = 0; i < ARRAY_SIZE(chips_init_cr); ++i) |
477 | write_cr(chips_init_cr[i].addr, chips_init_cr[i].data); | 475 | write_cr(chips_init_cr[i].addr, chips_init_cr[i].data); |
478 | for (i = 0; i < N_ELTS(chips_init_fr); ++i) | 476 | for (i = 0; i < ARRAY_SIZE(chips_init_fr); ++i) |
479 | write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); | 477 | write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); |
480 | } | 478 | } |
481 | 479 | ||