Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3de3402 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Lee Jones
Browse files

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent a5d8e2e7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -223,6 +223,8 @@ static ssize_t actual_brightness_show(struct device *dev,
	mutex_lock(&bd->ops_lock);
	if (bd->ops && bd->ops->get_brightness)
		rc = sprintf(buf, "%d\n", bd->ops->get_brightness(bd));
	else
		rc = sprintf(buf, "%d\n", bd->props.brightness);
	mutex_unlock(&bd->ops_lock);

	return rc;