From: hjc Date: Mon, 29 Dec 2014 03:59:03 +0000 (+0800) Subject: rk3368 lcdc: fix shutdown lead to scrash X-Git-Tag: firefly_0821_release~4158^2~472 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e1f5c2d954be5a2eea12613fb26bfce3e6ae8a36;p=firefly-linux-kernel-4.4.55.git rk3368 lcdc: fix shutdown lead to scrash Signed-off-by: hjc --- diff --git a/drivers/video/rockchip/lcdc/rk3368_lcdc.c b/drivers/video/rockchip/lcdc/rk3368_lcdc.c index a00729c10bfd..6dfb657fc4ab 100644 --- a/drivers/video/rockchip/lcdc/rk3368_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3368_lcdc.c @@ -435,20 +435,8 @@ static int rk3368_lcdc_pre_init(struct rk_lcdc_driver *dev_drv) return 0; } -static void __maybe_unused - rk3368_lcdc_deint(struct lcdc_device *lcdc_dev) +static void rk3368_lcdc_deint(struct lcdc_device *lcdc_dev) { - rk3368_lcdc_disable_irq(lcdc_dev); - spin_lock(&lcdc_dev->reg_lock); - if (likely(lcdc_dev->clk_on)) { - lcdc_dev->clk_on = 0; - lcdc_set_bit(lcdc_dev, SYS_CTRL, m_STANDBY_EN); - lcdc_cfg_done(lcdc_dev); - spin_unlock(&lcdc_dev->reg_lock); - } else { - spin_unlock(&lcdc_dev->reg_lock); - } - mdelay(1); } static int rk3368_lcdc_post_cfg(struct rk_lcdc_driver *dev_drv) @@ -4416,12 +4404,8 @@ static void rk3368_lcdc_shutdown(struct platform_device *pdev) { struct lcdc_device *lcdc_dev = platform_get_drvdata(pdev); - if (0) {/*maybe lead to crash*/ - rk3368_lcdc_deint(lcdc_dev); - rk_disp_pwr_disable(&lcdc_dev->driver); - } else { - rk3368_lcdc_early_suspend(&lcdc_dev->driver); - } + rk3368_lcdc_early_suspend(&lcdc_dev->driver); + rk3368_lcdc_deint(lcdc_dev); } #if defined(CONFIG_OF)