Skip to content

Commit

Permalink
backlight/acpi: Update the backlight state when we change brightness
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Garrett authored and Richard Purdie committed Sep 21, 2009
1 parent 325253a commit 3634274
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3634274

Please sign in to comment.