public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi/video: lcd_get_level_current doen't return current level
@ 2013-03-30 13:01 Artem Savkov
  2013-03-31  1:56 ` Rafael J. Wysocki
  2013-03-31  6:15 ` Danny Baumann
  0 siblings, 2 replies; 8+ messages in thread
From: Artem Savkov @ 2013-03-30 13:01 UTC (permalink / raw)
  To: dannybaumann
  Cc: aaron.lu, rafael.j.wysocki, linux-acpi, linux-kernel,
	Artem Savkov

acpi_video_device_lcd_get_level_current() called acpi_video_bqc_value_to_level()
with "*level" as a second argument, resulting in level being returned based on
initial input, not current brightness, breaking backlight controls.

Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
---
 drivers/acpi/video.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 3cdd047..68a777b 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -505,7 +505,8 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
 				return 0;
 			}
 
-			*level = acpi_video_bqc_value_to_level(device, *level);
+			*level = acpi_video_bqc_value_to_level(device,
+					device->brightness->curr);
 
 			for (i = 2; i < device->brightness->count; i++)
 				if (device->brightness->levels[i] == *level) {
-- 
1.8.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-31 10:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-30 13:01 [PATCH] acpi/video: lcd_get_level_current doen't return current level Artem Savkov
2013-03-31  1:56 ` Rafael J. Wysocki
2013-03-31  6:15 ` Danny Baumann
2013-03-31  6:46   ` Artem Savkov
2013-03-31  7:04     ` Danny Baumann
2013-03-31  8:16       ` Artem Savkov
2013-03-31 10:07         ` Aaron Lu
2013-03-31 10:37           ` Artem Savkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox