You need to sign in or sign up before continuing.
提交 b3de3402 编写于 作者: A Andrzej Hajda 提交者: Lee Jones

backlight: Show brightness even if get_brightness is not implemented

Many implementations of get_brightness operation returns only value
of props.brightness field. This change makes such implementations
unnecessary.
Acked-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 a5d8e2e7
...@@ -223,6 +223,8 @@ static ssize_t actual_brightness_show(struct device *dev, ...@@ -223,6 +223,8 @@ static ssize_t actual_brightness_show(struct device *dev,
mutex_lock(&bd->ops_lock); mutex_lock(&bd->ops_lock);
if (bd->ops && bd->ops->get_brightness) if (bd->ops && bd->ops->get_brightness)
rc = sprintf(buf, "%d\n", bd->ops->get_brightness(bd)); rc = sprintf(buf, "%d\n", bd->ops->get_brightness(bd));
else
rc = sprintf(buf, "%d\n", bd->props.brightness);
mutex_unlock(&bd->ops_lock); mutex_unlock(&bd->ops_lock);
return rc; return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册