Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271985
b: refs/heads/master
c: bee460b
h: refs/heads/master
i:
  271983: 86c82e0
v: v3
  • Loading branch information
Jason Stubbs authored and Matthew Garrett committed Oct 24, 2011
1 parent c9ee265 commit 23170d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 093ed561648d43263c009ea88abab21a31cd4f1d
refs/heads/master: bee460be8c691c544e84ed678280ace6153104c6
9 changes: 6 additions & 3 deletions trunk/drivers/platform/x86/samsung-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,17 @@ static u8 read_brightness(void)
&sretval);
if (!retval) {
user_brightness = sretval.retval[0];
if (user_brightness != 0)
if (user_brightness > sabi_config->min_brightness)
user_brightness -= sabi_config->min_brightness;
else
user_brightness = 0;
}
return user_brightness;
}

static void set_brightness(u8 user_brightness)
{
u8 user_level = user_brightness - sabi_config->min_brightness;
u8 user_level = user_brightness + sabi_config->min_brightness;

sabi_set_command(sabi_config->commands.set_brightness, user_level);
}
Expand Down Expand Up @@ -811,7 +813,8 @@ static int __init samsung_init(void)
/* create a backlight device to talk to this one */
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_PLATFORM;
props.max_brightness = sabi_config->max_brightness;
props.max_brightness = sabi_config->max_brightness -
sabi_config->min_brightness;
backlight_device = backlight_device_register("samsung", &sdev->dev,
NULL, &backlight_ops,
&props);
Expand Down

0 comments on commit 23170d0

Please sign in to comment.