]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/acpi/video.c
video: always update the brightness when poking "brightness"
[net-next-2.6.git] / drivers / acpi / video.c
index baa4419297209efd6d79aaedb2dae13c2d1a6f92..66a610d0e2f5f14705cd88dbb305efd8e1786fa5 100644 (file)
@@ -481,6 +481,7 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
        int status = AE_OK;
        union acpi_object arg0 = { ACPI_TYPE_INTEGER };
        struct acpi_object_list args = { 1, &arg0 };
+       int state;
 
 
        arg0.integer.value = level;
@@ -489,6 +490,10 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
                status = acpi_evaluate_object(device->dev->handle, "_BCM",
                                              &args, NULL);
        device->brightness->curr = level;
+       for (state = 2; state < device->brightness->count; state++)
+               if (level == device->brightness->levels[state])
+                       device->backlight->props.brightness = state - 2;
+
        return status;
 }