From: Mattia Dongili Date: Sun, 12 Apr 2009 11:26:30 +0000 (+0000) Subject: sony-laptop: fix bogus error message display on resume X-Git-Tag: v3.12-rc1~14739^2~11^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c35d4b3532ed3e2076fb14c25385cf6cef41cc69;p=kernel%2Fkernel-generic.git sony-laptop: fix bogus error message display on resume 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 Signed-off-by: Len Brown --- diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 3541ca0..d93cff6 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;