浏览代码

sony-laptop: restore the last user requested brightness level on resume.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
Mattia Dongili 18 年之前
父节点
当前提交
e84a02ba0b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      drivers/misc/sony-laptop.c

+ 5 - 0
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);