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>
This commit is contained in:
Mattia Dongili 2009-04-12 11:26:30 +00:00 committed by Len Brown
parent 5aa63f038f
commit c35d4b3532

View File

@ -1041,7 +1041,7 @@ static int sony_nc_resume(struct acpi_device *device)
/* set the last requested brightness level */ /* set the last requested brightness level */
if (sony_backlight_device && 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"); printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
return 0; return 0;