提交 6192fa71 编写于 作者: M Mattia Dongili 提交者: Matthew Garrett

sony-laptop: report failures on setting LCD brightness

Check if we were successful in setting the requested brightness and
report failure in that case.
Signed-off-by: NMattia Dongili <malattia@linux.it>
Signed-off-by: NMatthew Garrett <mjg@redhat.com>
上级 9fbdaeb4
...@@ -966,9 +966,10 @@ static int sony_nc_update_status_ng(struct backlight_device *bd) ...@@ -966,9 +966,10 @@ static int sony_nc_update_status_ng(struct backlight_device *bd)
int *handle = (int *)bl_get_data(bd); int *handle = (int *)bl_get_data(bd);
value = bd->props.brightness; value = bd->props.brightness;
sony_call_snc_handle(*handle, 0x0100 | (value << 16), &result); if (sony_call_snc_handle(*handle, 0x0100 | (value << 16), &result))
return -EIO;
return sony_nc_get_brightness_ng(bd); return value;
} }
static const struct backlight_ops sony_backlight_ops = { static const struct backlight_ops sony_backlight_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册