Skip to content

Commit

Permalink
sony-laptop: report failures on setting LCD brightness
Browse files Browse the repository at this point in the history
Check if we were successful in setting the requested brightness and
report failure in that case.

Signed-off-by: Mattia Dongili <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
  • Loading branch information
malattia authored and Matthew Garrett committed May 9, 2011
1 parent 9fbdaeb commit 6192fa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,10 @@ static int sony_nc_update_status_ng(struct backlight_device *bd)
int *handle = (int *)bl_get_data(bd);

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 = {
Expand Down

0 comments on commit 6192fa7

Please sign in to comment.