Message ID | 1239535591-15514-6-git-send-email-malattia@linux.it (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index ddbd86b..419873a 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -1041,7 +1041,7 @@ static int sony_nc_resume(struct acpi_device *device) /* set the last requested brightness level */ if (sony_backlight_device && - !sony_backlight_update_status(sony_backlight_device)) + sony_backlight_update_status(sony_backlight_device) < 0) printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n"); return 0;
sony_backlight_update_status returns 0 on success -1 on failure (i.e.: the return value from acpi_callsetfunc. The return value in the resume path was broken and thus always displaying a bogus warning about not being able to restore the brightness level. Signed-off-by: Mattia Dongili <malattia@linux.it> --- drivers/platform/x86/sony-laptop.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)