From 7870bffe18ef2e4ace29cac61906e3f1f1ce34a1 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Mon, 4 Feb 2008 23:31:24 -0800 Subject: [PATCH] --- yaml --- r: 84159 b: refs/heads/master c: 863c1490e512db40dab61e44b694a493a9e68b3f h: refs/heads/master i: 84157: cf86903cf099be045a9f12cd2d6b3c377c323a69 84155: a4660e61fe55eff55cd15e5ec02522bcd3e3b43d 84151: 6e0768023be08ce1d4c47249ba07bd94de54e226 84143: 40fc190c050bd85f0cd0afef40e72f8da701dfc2 84127: 554afde84160eb9ac9d7e48ce4b36c501d1b41cb 84095: dd26dc39516ffe5df397a690abfcc3a4a0bf6702 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/video.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 56cf494c6ebf..d098ed40c18e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7761f638f6e0f276fe8612ba306d09c40d1b553c +refs/heads/master: 863c1490e512db40dab61e44b694a493a9e68b3f diff --git a/trunk/drivers/acpi/video.c b/trunk/drivers/acpi/video.c index 74ff0faeab57..b5e35cd559ea 100644 --- a/trunk/drivers/acpi/video.c +++ b/trunk/drivers/acpi/video.c @@ -77,6 +77,7 @@ module_param(brightness_switch_enabled, bool, 0644); static int acpi_video_bus_add(struct acpi_device *device); static int acpi_video_bus_remove(struct acpi_device *device, int type); +static int acpi_video_resume(struct acpi_device *device); static const struct acpi_device_id video_device_ids[] = { {ACPI_VIDEO_HID, 0}, @@ -91,6 +92,7 @@ static struct acpi_driver acpi_video_bus = { .ops = { .add = acpi_video_bus_add, .remove = acpi_video_bus_remove, + .resume = acpi_video_resume, }, }; @@ -1837,6 +1839,25 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) } static int instance; +static int acpi_video_resume(struct acpi_device *device) +{ + struct acpi_video_bus *video; + struct acpi_video_device *video_device; + int i; + + if (!device || !acpi_driver_data(device)) + return -EINVAL; + + video = acpi_driver_data(device); + + for (i = 0; i < video->attached_count; i++) { + video_device = video->attached_array[i].bind_info; + if (video_device && video_device->backlight) + acpi_video_set_brightness(video_device->backlight); + } + return AE_OK; +} + static int acpi_video_bus_add(struct acpi_device *device) { acpi_status status;