diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/video.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 74ff0faeab57..b5e35cd559ea 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -77,6 +77,7 @@ module_param(brightness_switch_enabled, bool, 0644); | |||
77 | 77 | ||
78 | static int acpi_video_bus_add(struct acpi_device *device); | 78 | static int acpi_video_bus_add(struct acpi_device *device); |
79 | static int acpi_video_bus_remove(struct acpi_device *device, int type); | 79 | static int acpi_video_bus_remove(struct acpi_device *device, int type); |
80 | static int acpi_video_resume(struct acpi_device *device); | ||
80 | 81 | ||
81 | static const struct acpi_device_id video_device_ids[] = { | 82 | static const struct acpi_device_id video_device_ids[] = { |
82 | {ACPI_VIDEO_HID, 0}, | 83 | {ACPI_VIDEO_HID, 0}, |
@@ -91,6 +92,7 @@ static struct acpi_driver acpi_video_bus = { | |||
91 | .ops = { | 92 | .ops = { |
92 | .add = acpi_video_bus_add, | 93 | .add = acpi_video_bus_add, |
93 | .remove = acpi_video_bus_remove, | 94 | .remove = acpi_video_bus_remove, |
95 | .resume = acpi_video_resume, | ||
94 | }, | 96 | }, |
95 | }; | 97 | }; |
96 | 98 | ||
@@ -1837,6 +1839,25 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
1837 | } | 1839 | } |
1838 | 1840 | ||
1839 | static int instance; | 1841 | static int instance; |
1842 | static int acpi_video_resume(struct acpi_device *device) | ||
1843 | { | ||
1844 | struct acpi_video_bus *video; | ||
1845 | struct acpi_video_device *video_device; | ||
1846 | int i; | ||
1847 | |||
1848 | if (!device || !acpi_driver_data(device)) | ||
1849 | return -EINVAL; | ||
1850 | |||
1851 | video = acpi_driver_data(device); | ||
1852 | |||
1853 | for (i = 0; i < video->attached_count; i++) { | ||
1854 | video_device = video->attached_array[i].bind_info; | ||
1855 | if (video_device && video_device->backlight) | ||
1856 | acpi_video_set_brightness(video_device->backlight); | ||
1857 | } | ||
1858 | return AE_OK; | ||
1859 | } | ||
1860 | |||
1840 | static int acpi_video_bus_add(struct acpi_device *device) | 1861 | static int acpi_video_bus_add(struct acpi_device *device) |
1841 | { | 1862 | { |
1842 | acpi_status status; | 1863 | acpi_status status; |