From: Mattia Dongili Date: Fri, 3 Aug 2007 15:22:30 +0000 (+0900) Subject: sony-laptop: restore the last user requested brightness level on resume. X-Git-Tag: MMI-PSA29.97-13-9~40779^2~8^3~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e84a02ba0b33a97a8486f3248fd45f50b1a1c014;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git sony-laptop: restore the last user requested brightness level on resume. Signed-off-by: Mattia Dongili Signed-off-by: Len Brown --- diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 14ee06c8f127..9a803e13c307 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -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);