xf86-video-intel: src/backlight.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Oct 11 13:36:31 PDT 2014


 src/backlight.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 49376ba3bddd15e62df55928198160d9970dc1c6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Oct 11 21:34:40 2014 +0100

    backlight: Open bl_power using WRONLY for writing.
    
    Jan spotted that we open the bl_power file using O_RDONLY and then attempt
    to write the new power state into it. This fails...
    
    Reported-by: Jan Steffens
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/backlight.c b/src/backlight.c
index 4d3c39f..c7ff105 100644
--- a/src/backlight.c
+++ b/src/backlight.c
@@ -217,7 +217,7 @@ __backlight_write(const char *iface, const char *file, const char *value)
 {
 	int fd, ret;
 
-	fd = __backlight_open(iface, file, O_RDONLY);
+	fd = __backlight_open(iface, file, O_WRONLY);
 	if (fd < 0)
 		return -1;
 


More information about the xorg-commit mailing list