diff mbox

[02/12] ACPI / PM: Move ACPI video resume to a PM notifier

Message ID 201004062055.43290.rjw@sisk.pl (mailing list archive)
State New, archived
Delegated to: Len Brown
Headers show

Commit Message

Rafael Wysocki April 6, 2010, 6:55 p.m. UTC
None
diff mbox

Patch

Index: linux-2.6/drivers/acpi/video.c
===================================================================
--- linux-2.6.orig/drivers/acpi/video.c
+++ linux-2.6/drivers/acpi/video.c
@@ -1020,6 +1020,13 @@  static void acpi_video_device_find_cap(s
 		if (IS_ERR(device->backlight))
 			return;
 
+		/*
+		 * Save current brightness level in case we have to restore it
+		 * before acpi_video_device_lcd_set_level() is called next time.
+		 */
+		device->backlight->props.brightness =
+				acpi_video_get_brightness(device->backlight);
+
 		result = sysfs_create_link(&device->backlight->dev.kobj,
 					   &device->dev->dev.kobj, "device");
 		if (result)