diff options
author | Timur Tabi <timur@freescale.com> | 2011-12-19 17:26:16 -0500 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-01-03 10:59:08 -0500 |
commit | d397e916f313441d0c6b37df4b296c1dcc6aa202 (patch) | |
tree | 99c4107c132c8e652982bdaaf1808b2df0158728 | |
parent | 934dbeebed7764de683f8048cd94973d47c57f7b (diff) |
drivers/video: fsl-diu-fb: remove broken reference count enabling the display
The functions enable_lcdc() and disable_lcdc() used the variable fb_enable
to keep a reference count of when the display is enabled, but the code is
broken. The display is always disabled when disable_lcdc(), and it is
always enabled when enable_lcdc() is called, regardless of the value of
fb_enable. Obviously, we don't need to keep a reference count, so just
remove the variable.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
-rw-r--r-- | drivers/video/fsl-diu-fb.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 231752ef7e1c..d8d461d6c90b 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -352,7 +352,6 @@ struct mfb_info { | |||
352 | * @fsl_diu_info: fb_info objects, one per AOI | 352 | * @fsl_diu_info: fb_info objects, one per AOI |
353 | * @dev_attr: sysfs structure | 353 | * @dev_attr: sysfs structure |
354 | * @irq: IRQ | 354 | * @irq: IRQ |
355 | * @fb_enabled: TRUE if the DIU is enabled, FALSE if not | ||
356 | * @monitor_port: the monitor port this DIU is connected to | 355 | * @monitor_port: the monitor port this DIU is connected to |
357 | * @diu_reg: pointer to the DIU hardware registers | 356 | * @diu_reg: pointer to the DIU hardware registers |
358 | * @reg_lock: spinlock for register access | 357 | * @reg_lock: spinlock for register access |
@@ -371,7 +370,6 @@ struct fsl_diu_data { | |||
371 | struct mfb_info mfb[NUM_AOIS]; | 370 | struct mfb_info mfb[NUM_AOIS]; |
372 | struct device_attribute dev_attr; | 371 | struct device_attribute dev_attr; |
373 | unsigned int irq; | 372 | unsigned int irq; |
374 | int fb_enabled; | ||
375 | enum fsl_diu_monitor_port monitor_port; | 373 | enum fsl_diu_monitor_port monitor_port; |
376 | struct diu __iomem *diu_reg; | 374 | struct diu __iomem *diu_reg; |
377 | spinlock_t reg_lock; | 375 | spinlock_t reg_lock; |
@@ -619,10 +617,7 @@ static void enable_lcdc(struct fb_info *info) | |||
619 | struct fsl_diu_data *data = mfbi->parent; | 617 | struct fsl_diu_data *data = mfbi->parent; |
620 | struct diu __iomem *hw = data->diu_reg; | 618 | struct diu __iomem *hw = data->diu_reg; |
621 | 619 | ||
622 | if (!data->fb_enabled) { | 620 | out_be32(&hw->diu_mode, MFB_MODE1); |
623 | out_be32(&hw->diu_mode, MFB_MODE1); | ||
624 | data->fb_enabled++; | ||
625 | } | ||
626 | } | 621 | } |
627 | 622 | ||
628 | static void disable_lcdc(struct fb_info *info) | 623 | static void disable_lcdc(struct fb_info *info) |
@@ -631,10 +626,7 @@ static void disable_lcdc(struct fb_info *info) | |||
631 | struct fsl_diu_data *data = mfbi->parent; | 626 | struct fsl_diu_data *data = mfbi->parent; |
632 | struct diu __iomem *hw = data->diu_reg; | 627 | struct diu __iomem *hw = data->diu_reg; |
633 | 628 | ||
634 | if (data->fb_enabled) { | 629 | out_be32(&hw->diu_mode, 0); |
635 | out_be32(&hw->diu_mode, 0); | ||
636 | data->fb_enabled = 0; | ||
637 | } | ||
638 | } | 630 | } |
639 | 631 | ||
640 | static void adjust_aoi_size_position(struct fb_var_screeninfo *var, | 632 | static void adjust_aoi_size_position(struct fb_var_screeninfo *var, |