sony-laptop: restore the last user requested brightness level on resume.
authorMattia Dongili <malattia@linux.it>
Fri, 3 Aug 2007 15:22:30 +0000 (00:22 +0900)
committerLen Brown <len.brown@intel.com>
Fri, 3 Aug 2007 19:25:00 +0000 (15:25 -0400)
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/misc/sony-laptop.c

index 14ee06c8f12727ebd3d0a950b7e870d440616305..9a803e13c30776e95da70e419d3d820df5ffe5b1 100644 (file)
@@ -942,6 +942,11 @@ 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))
+               printk(KERN_WARNING DRV_PFX "unable to restore brightness level");
+
        /* re-initialize models with specific requirements */
        dmi_check_system(sony_nc_ids);