diff options
author | Krzysztof Halasa <khc@pm.waw.pl> | 2007-10-16 10:29:33 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 18:43:19 +0200 |
commit | ee5618f4937dcbff15e504663d81a7adb3d849bf (patch) | |
tree | 3fec7a2565f4f123ab2ccd0b3243e3bf49f16b6b /drivers/video/intelfb/intelfbhw.c | |
parent | Intel FB: whitespace, bracket and other clean-ups (diff) | |
download | linux-ee5618f4937dcbff15e504663d81a7adb3d849bf.tar.xz linux-ee5618f4937dcbff15e504663d81a7adb3d849bf.zip |
Intel FB: obvious changes and corrections
Intel FB: obvious changes and corrections
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: <sylvain.meyer@worldonline.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/intelfb/intelfbhw.c')
-rw-r--r-- | drivers/video/intelfb/intelfbhw.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index fe38df8e2b6f..270f6552603c 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c @@ -434,14 +434,14 @@ void intelfbhw_setcolreg(struct intelfb_info *dinfo, unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp) { + u32 palette_reg = (dinfo->pipe == PIPE_A) ? + PALETTE_A : PALETTE_B; + #if VERBOSE > 0 DBG_MSG("intelfbhw_setcolreg: %d: (%d, %d, %d)\n", regno, red, green, blue); #endif - u32 palette_reg = (dinfo->pipe == PIPE_A) ? - PALETTE_A : PALETTE_B; - OUTREG(palette_reg + (regno << 2), (red << PALETTE_8_RED_SHIFT) | (green << PALETTE_8_GREEN_SHIFT) | @@ -1305,8 +1305,8 @@ int intelfbhw_program_mode(struct intelfb_info *dinfo, count = 0; do { - tmp_val[count%3] = INREG(0x70000); - if ((tmp_val[0] == tmp_val[1]) && (tmp_val[1]==tmp_val[2])) + tmp_val[count % 3] = INREG(PIPEA_DSL); + if ((tmp_val[0] == tmp_val[1]) && (tmp_val[1] == tmp_val[2])) break; count++; udelay(1); @@ -2004,7 +2004,6 @@ intelfbhw_enable_irq(struct intelfb_info *dinfo, int reenable) { void intelfbhw_disable_irq(struct intelfb_info *dinfo) { - u16 tmp; if (test_and_clear_bit(0, &dinfo->irq_flags)) { if (dinfo->vsync.pan_display) { @@ -2016,8 +2015,7 @@ intelfbhw_disable_irq(struct intelfb_info *dinfo) { OUTREG16(IMR, 0xffff); OUTREG16(IER, 0x0); - tmp = INREG16(IIR); - OUTREG16(IIR, tmp); + OUTREG16(IIR, INREG16(IIR)); /* clear IRQ requests */ spin_unlock_irq(&dinfo->int_lock); free_irq(dinfo->pdev->irq, dinfo); |