From: yxj Date: Tue, 18 Mar 2014 10:40:37 +0000 (+0800) Subject: rk3188 lcdc: fix suspend X-Git-Tag: firefly_0821_release~6021 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a48725c35d230f3dd7467b6fce86cef8c205cfc9;p=firefly-linux-kernel-4.4.55.git rk3188 lcdc: fix suspend --- diff --git a/drivers/video/rockchip/lcdc/rk3188_lcdc.c b/drivers/video/rockchip/lcdc/rk3188_lcdc.c index b10d925436c2..dae15425f8e9 100755 --- a/drivers/video/rockchip/lcdc/rk3188_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3188_lcdc.c @@ -1114,9 +1114,6 @@ static int rk3188_lcdc_early_resume(struct rk_lcdc_driver *dev_drv) static int rk3188_lcdc_blank(struct rk_lcdc_driver *dev_drv, int win_id, int blank_mode) { - struct lcdc_device *lcdc_dev = - container_of(dev_drv, struct lcdc_device, driver); - switch (blank_mode) { case FB_BLANK_UNBLANK: rk3188_lcdc_early_resume(dev_drv); @@ -1485,7 +1482,10 @@ static int rk3188_lcdc_cfg_done(struct rk_lcdc_driver *dev_drv) { struct lcdc_device *lcdc_dev = container_of(dev_drv, struct lcdc_device, driver); - lcdc_cfg_done(lcdc_dev); + spin_lock(&lcdc_dev->reg_lock); + if (lcdc_dev->clk_on) + lcdc_cfg_done(lcdc_dev); + spin_unlock(&lcdc_dev->reg_lock); return 0; }