Re: [sony-laptop] Fix regression caused by "sony-laptop: fingers off backlight if video.ko is serving this functionality"

Previous thread: [PATCH 2/2] tracing/function-return-tracer: Call prepare_ftrace_return by registers by Frederic Weisbecker on Wednesday, November 12, 2008 - 5:49 pm. (15 messages)

Next thread: dma_pool_alloc restrict < 4GB address by Anil kumar on Wednesday, November 12, 2008 - 6:14 pm. (2 messages)
To: <len.brown@...>
Cc: <trenn@...>, <linux-kernel@...>, <linux-acpi@...>
Date: Wednesday, November 12, 2008 - 6:03 pm

After commit 540b8bb9c33935183ceb5bed466a42ad72b2af56:

sony-laptop: fingers off backlight if video.ko is serving this functionality

I can't set brightness on my sony laptop (nothing in /sys/class/backlight).
dmesg says "sony-laptop: Sony: Brightness ignored, must be controlled by ACPI
video driver".
The function acpi_video_backlight_support returns 0 if we should use the
vendor-specific backlight support, while non-0 if the ACPI generic should
be used. Because of this, the check introduced by the said commit appears
reversed.

Signed-off-by: Alessandro Guido <ag@alessandroguido.name>
---
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 7bcb810..2a613d4 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -1038,7 +1038,7 @@ static int sony_nc_add(struct acpi_device *device)
goto outinput;
}

- if (!acpi_video_backlight_support()) {
+ if (acpi_video_backlight_support()) {
printk(KERN_INFO DRV_PFX "Sony: Brightness ignored, must be "
"controlled by ACPI video driver\n");
} else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT",

--

To: Alessandro Guido <ag@...>
Cc: <trenn@...>, Linux Kernel Mailing List <linux-kernel@...>, <linux-acpi@...>
Date: Thursday, November 13, 2008 - 1:56 am

applied.

thanks for testing!

-Len

--

To: Alessandro Guido <ag@...>
Cc: <len.brown@...>, <linux-kernel@...>, <linux-acpi@...>
Date: Wednesday, November 12, 2008 - 6:27 pm

Thanks for finding this stupid typo,

--

Previous thread: [PATCH 2/2] tracing/function-return-tracer: Call prepare_ftrace_return by registers by Frederic Weisbecker on Wednesday, November 12, 2008 - 5:49 pm. (15 messages)

Next thread: dma_pool_alloc restrict < 4GB address by Anil kumar on Wednesday, November 12, 2008 - 6:14 pm. (2 messages)