diff options
author | Mattia Dongili <malattia@linux.it> | 2009-04-12 07:26:30 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-04-23 23:57:34 -0400 |
commit | c35d4b3532ed3e2076fb14c25385cf6cef41cc69 (patch) | |
tree | 958a8409fc348a48ac9185981c5b66bde6e53897 /drivers/platform | |
parent | 5aa63f038f042fd1acd6e720a95df72857db0bc7 (diff) |
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 <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 3541ca097d09..d93cff656c99 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) | |||
1041 | 1041 | ||
1042 | /* set the last requested brightness level */ | 1042 | /* set the last requested brightness level */ |
1043 | if (sony_backlight_device && | 1043 | if (sony_backlight_device && |
1044 | !sony_backlight_update_status(sony_backlight_device)) | 1044 | sony_backlight_update_status(sony_backlight_device) < 0) |
1045 | printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n"); | 1045 | printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n"); |
1046 | 1046 | ||
1047 | return 0; | 1047 | return 0; |