diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-28 21:23:56 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-11 10:16:04 +0000 |
commit | 052a7f5c496b7d2966edea0f576ec39f41703992 (patch) | |
tree | cf861473d9a09e82c667a3a76ea404e40453946a /drivers/video/cyber2000fb.c | |
parent | e5dedf8d561fb309ba37003546025300678da549 (diff) | |
download | op-kernel-dev-052a7f5c496b7d2966edea0f576ec39f41703992.zip op-kernel-dev-052a7f5c496b7d2966edea0f576ec39f41703992.tar.gz |
VIDEO: cyberpro: make 'reg_b0_lock' always present
Rather than conditionally compiling out reg_b0_lock, always keep it
available, and always take it when changing the PLL rates.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/video/cyber2000fb.c')
-rw-r--r-- | drivers/video/cyber2000fb.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index 87d2aaf..eeccdb8 100644 --- a/drivers/video/cyber2000fb.c +++ b/drivers/video/cyber2000fb.c @@ -91,11 +91,13 @@ struct cfb_info { u_char ramdac_powerdown; u32 pseudo_palette[16]; + + spinlock_t reg_b0_lock; + #ifdef CONFIG_FB_CYBER2000_DDC bool ddc_registered; struct i2c_adapter ddc_adapter; struct i2c_algo_bit_data ddc_algo; - spinlock_t reg_b0_lock; #endif }; @@ -503,9 +505,7 @@ static void cyber2000fb_set_timing(struct cfb_info *cfb, struct par_info *hw) cyber2000_attrw(0x14, 0x00, cfb); /* PLL registers */ -#ifdef CONFIG_FB_CYBER2000_DDC spin_lock(&cfb->reg_b0_lock); -#endif cyber2000_grphw(EXT_DCLK_MULT, hw->clock_mult, cfb); cyber2000_grphw(EXT_DCLK_DIV, hw->clock_div, cfb); cyber2000_grphw(EXT_MCLK_MULT, cfb->mclk_mult, cfb); @@ -513,9 +513,7 @@ static void cyber2000fb_set_timing(struct cfb_info *cfb, struct par_info *hw) cyber2000_grphw(0x90, 0x01, cfb); cyber2000_grphw(0xb9, 0x80, cfb); cyber2000_grphw(0xb9, 0x00, cfb); -#ifdef CONFIG_FB_CYBER2000_DDC spin_unlock(&cfb->reg_b0_lock); -#endif cfb->ramdac_ctrl = hw->ramdac; cyber2000fb_write_ramdac_ctrl(cfb); @@ -1233,8 +1231,6 @@ static int cyber2000fb_ddc_getsda(void *data) static int __devinit cyber2000fb_setup_ddc_bus(struct cfb_info *cfb) { - spin_lock_init(&cfb->reg_b0_lock); - strlcpy(cfb->ddc_adapter.name, cfb->fb.fix.id, sizeof(cfb->ddc_adapter.name)); cfb->ddc_adapter.owner = THIS_MODULE; @@ -1389,6 +1385,8 @@ static struct cfb_info __devinit *cyberpro_alloc_fb_info(unsigned int id, cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; cfb->fb.pseudo_palette = cfb->pseudo_palette; + spin_lock_init(&cfb->reg_b0_lock); + fb_alloc_cmap(&cfb->fb.cmap, NR_PALETTE, 0); return cfb; |