From ecaedee15f94058d2723a0c06292f15ec6ba3a3c Mon Sep 17 00:00:00 2001 From: yxj Date: Mon, 4 Jun 2012 14:10:46 +0800 Subject: [PATCH] rkfb_sysfs: modify set_fb_state --- drivers/video/rockchip/rkfb_sysfs.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/video/rockchip/rkfb_sysfs.c b/drivers/video/rockchip/rkfb_sysfs.c index fd3edf96aa4d..46bd7720a47b 100644 --- a/drivers/video/rockchip/rkfb_sysfs.c +++ b/drivers/video/rockchip/rkfb_sysfs.c @@ -95,6 +95,9 @@ static ssize_t set_fb_state(struct device *dev,struct device_attribute *attr, const char *buf, size_t count) { struct fb_info *fbi = dev_get_drvdata(dev); + struct rk_lcdc_device_driver * dev_drv = + (struct rk_lcdc_device_driver * )fbi->par; + int layer_id = get_fb_layer_id(&fbi->fix); int state; int ret; ret = kstrtoint(buf, 0, &state); @@ -102,14 +105,7 @@ static ssize_t set_fb_state(struct device *dev,struct device_attribute *attr, { return ret; } - if(state) - { - fbi->fbops->fb_open(fbi,1); - } - else - { - fbi->fbops->fb_release(fbi,1); - } + dev_drv->open(dev_drv,layer_id,state); return count; } -- 2.34.1