浏览代码

backlight/acpi: Update the backlight state when we change brightness

Trigger a status update when we change the brightness in the driver, thus
allowing userspace to present appropriate UI.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Matthew Garrett 16 年之前
父节点
当前提交
36342742a3
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/acpi/video.c

+ 4 - 0
drivers/acpi/video.c

@@ -1960,6 +1960,10 @@ acpi_video_switch_brightness(struct acpi_video_device *device, int event)
 
 	result = acpi_video_device_lcd_set_level(device, level_next);
 
+	if (!result)
+		backlight_force_update(device->backlight,
+				       BACKLIGHT_UPDATE_HOTKEY);
+
 out:
 	if (result)
 		printk(KERN_ERR PREFIX "Failed to switch the brightness\n");