aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2008-12-30 21:58:48 -0500
committerLen Brown <len.brown@intel.com>2008-12-30 23:39:43 -0500
commit9e6dada9d255497127251c03aaa59296d186f959 (patch)
treeed1cb1773685211758ae88d41f80f8df9146afaf /drivers
parent11e93130c7ce5228d484fd5e86f3984835d4256b (diff)
video: always update the brightness when poking "brightness"
always update props.brightness no matter the backlight is changed via procfs, hotkeys or sysfs. Sighed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/video.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index baa441929720..66a610d0e2f5 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -481,6 +481,7 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
481 int status = AE_OK; 481 int status = AE_OK;
482 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 482 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
483 struct acpi_object_list args = { 1, &arg0 }; 483 struct acpi_object_list args = { 1, &arg0 };
484 int state;
484 485
485 486
486 arg0.integer.value = level; 487 arg0.integer.value = level;
@@ -489,6 +490,10 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
489 status = acpi_evaluate_object(device->dev->handle, "_BCM", 490 status = acpi_evaluate_object(device->dev->handle, "_BCM",
490 &args, NULL); 491 &args, NULL);
491 device->brightness->curr = level; 492 device->brightness->curr = level;
493 for (state = 2; state < device->brightness->count; state++)
494 if (level == device->brightness->levels[state])
495 device->backlight->props.brightness = state - 2;
496
492 return status; 497 return status;
493} 498}
494 499