From a48725c35d230f3dd7467b6fce86cef8c205cfc9 Mon Sep 17 00:00:00 2001 From: yxj Date: Tue, 18 Mar 2014 18:40:37 +0800 Subject: [PATCH] rk3188 lcdc: fix suspend --- drivers/video/rockchip/lcdc/rk3188_lcdc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.34.1