Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101994
b: refs/heads/master
c: f2b585b
h: refs/heads/master
v: v3
  • Loading branch information
Carlos Corbacho authored and Andi Kleen committed Jul 16, 2008
1 parent 5a92130 commit 65e9451
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9991d9f2bc75dc8735932240b67432d4073b8f60
refs/heads/master: f2b585b4a31731b17b9769eae523986fa7fddcde
14 changes: 12 additions & 2 deletions trunk/drivers/misc/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/dmi.h>
#include <linux/fb.h>
#include <linux/backlight.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
Expand Down Expand Up @@ -830,7 +831,15 @@ static int read_brightness(struct backlight_device *bd)

static int update_bl_status(struct backlight_device *bd)
{
set_u32(bd->props.brightness, ACER_CAP_BRIGHTNESS);
int intensity = bd->props.brightness;

if (bd->props.power != FB_BLANK_UNBLANK)
intensity = 0;
if (bd->props.fb_blank != FB_BLANK_UNBLANK)
intensity = 0;

set_u32(intensity, ACER_CAP_BRIGHTNESS);

return 0;
}

Expand All @@ -852,8 +861,9 @@ static int __devinit acer_backlight_init(struct device *dev)

acer_backlight_device = bd;

bd->props.power = FB_BLANK_UNBLANK;
bd->props.brightness = max_brightness;
bd->props.max_brightness = max_brightness;
bd->props.brightness = read_brightness(NULL);
backlight_update_status(bd);
return 0;
}
Expand Down

0 comments on commit 65e9451

Please sign in to comment.