Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271999
b: refs/heads/master
c: ba05b23
h: refs/heads/master
i:
  271997: ce5d720
  271995: da7df0a
  271991: 8461b79
  271983: 86c82e0
  271967: 980172a
  271935: ee30139
  271871: ccf9a98
v: v3
  • Loading branch information
John Serock authored and Matthew Garrett committed Oct 24, 2011
1 parent 41f6b6c commit 4e30b83
Show file tree
Hide file tree
Showing 2 changed files with 9 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: be3128b107e36271f7973ef213ccde603a494fe8
refs/heads/master: ba05b237372bad82533d1f717569d1d817ff3c27
10 changes: 8 additions & 2 deletions trunk/drivers/platform/x86/samsung-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,9 @@ static int get_brightness(struct backlight_device *bd)

static void check_for_stepping_quirk(void)
{
u8 initial_level = read_brightness();
u8 initial_level;
u8 check_level;
u8 orig_level = read_brightness();

/*
* Some laptops exhibit the strange behaviour of stepping toward
Expand All @@ -414,6 +415,11 @@ static void check_for_stepping_quirk(void)
* around in set_brightness.
*/

if (orig_level == 0)
set_brightness(1);

initial_level = read_brightness();

if (initial_level <= 2)
check_level = initial_level + 2;
else
Expand All @@ -427,7 +433,7 @@ static void check_for_stepping_quirk(void)
pr_info("enabled workaround for brightness stepping quirk\n");
}

set_brightness(initial_level);
set_brightness(orig_level);
}

static int update_status(struct backlight_device *bd)
Expand Down

0 comments on commit 4e30b83

Please sign in to comment.