From: yzq Date: Sat, 29 Dec 2012 06:19:25 +0000 (+0800) Subject: backlight:remove compile warning X-Git-Tag: firefly_0821_release~8048 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d6aa641f43f80f32844d8b384483cbb729fa9fdf;p=firefly-linux-kernel-4.4.55.git backlight:remove compile warning --- diff --git a/drivers/video/backlight/rk29_backlight.c b/drivers/video/backlight/rk29_backlight.c index 40dc0bdaaef0..7989b0b5f325 100755 --- a/drivers/video/backlight/rk29_backlight.c +++ b/drivers/video/backlight/rk29_backlight.c @@ -56,7 +56,7 @@ static struct backlight_device *rk29_bl; static int suspend_flag = 0; -int convertint(char s[]) +int convertint(const char s[]) { int i; int n = 0; @@ -67,8 +67,8 @@ int convertint(char s[]) return n; } -static ssize_t backlight_write(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t backlight_write(struct device *dev, + struct device_attribute *attr,const char *buf, size_t count) { struct rk29_bl_info *rk29_bl_info = bl_get_data(rk29_bl); @@ -84,9 +84,8 @@ static ssize_t backlight_write(struct device *dev, static ssize_t backlight_read(struct device *dev, struct device_attribute *attr, char *buf) { - struct rk29_bl_info *rk29_bl_info = bl_get_data(rk29_bl); - DBG("rk29_bl_info->min_brightness=%d\n",rk29_bl_info->min_brightness); + return 0; } static DEVICE_ATTR(rk29backlight, 0660, backlight_read, backlight_write); @@ -193,7 +192,6 @@ static DECLARE_DELAYED_WORK(rk29_backlight_work, rk29_backlight_work_func); #ifdef CONFIG_HAS_EARLYSUSPEND static void rk29_bl_suspend(struct early_suspend *h) { - struct rk29_bl_info *rk29_bl_info = bl_get_data(rk29_bl); int brightness = rk29_bl->props.brightness; cancel_delayed_work_sync(&rk29_backlight_work); @@ -223,9 +221,9 @@ static struct early_suspend bl_early_suspend = { .level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN - 1, }; -bool rk29_get_backlight_status() +bool rk29_get_backlight_status(void) { - return (rk29_bl->props.state & BL_CORE_DRIVER3)?true:false; + return ((rk29_bl->props.state & BL_CORE_DRIVER3)==BL_CORE_DRIVER3)?true:false; } EXPORT_SYMBOL(rk29_get_backlight_status);