From bbf4688df44034e227392801990926ed9d8feb8e Mon Sep 17 00:00:00 2001 From: yxj Date: Wed, 29 Aug 2012 17:06:01 +0800 Subject: [PATCH] rk2928:fix panic in early_suspend --- drivers/video/rockchip/chips/rk2928_lcdc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/video/rockchip/chips/rk2928_lcdc.c b/drivers/video/rockchip/chips/rk2928_lcdc.c index 7fa32bc45629..cb1bf46b895c 100755 --- a/drivers/video/rockchip/chips/rk2928_lcdc.c +++ b/drivers/video/rockchip/chips/rk2928_lcdc.c @@ -819,8 +819,8 @@ int rk2928_lcdc_early_suspend(struct rk_lcdc_device_driver *dev_drv) { struct rk2928_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk2928_lcdc_device,driver); - if(lcdc_dev->screen->sscreen_set != NULL) - lcdc_dev->screen->sscreen_set(lcdc_dev->screen , 0); + if(dev_drv->cur_screen->sscreen_set) + dev_drv->cur_screen->sscreen_set(dev_drv->cur_screen , 0); spin_lock(&lcdc_dev->reg_lock); if(likely(lcdc_dev->clk_on)) @@ -870,8 +870,10 @@ int rk2928_lcdc_early_resume(struct rk_lcdc_device_driver *dev_drv) lcdc_dev->clk_on = 1; spin_unlock(&lcdc_dev->reg_lock); - if(lcdc_dev->screen->sscreen_set != NULL) - lcdc_dev->screen->sscreen_set(lcdc_dev->screen , 1); + + if(dev_drv->cur_screen->sscreen_set) + dev_drv->cur_screen->sscreen_set(dev_drv->cur_screen , 1); + return 0; } -- 2.34.1