Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310141
b: refs/heads/master
c: 9696088
h: refs/heads/master
i:
  310139: 401a97b
v: v3
  • Loading branch information
Seth Forshee authored and Matthew Garrett committed May 31, 2012
1 parent 4ffcbfa commit d0657b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc7ab495c7532f06bc03021c0d78ac384fb13c14
refs/heads/master: 96960880c31131ab906e7e0627ab89e8319c385e
4 changes: 4 additions & 0 deletions trunk/drivers/platform/x86/apple-gmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ static int gmux_update_status(struct backlight_device *bd)
struct apple_gmux_data *gmux_data = bl_get_data(bd);
u32 brightness = bd->props.brightness;

if (bd->props.state & BL_CORE_SUSPENDED)
brightness = 0;

/*
* Older gmux versions require writing out lower bytes first then
* setting the upper byte to 0 to flush the values. Newer versions
Expand All @@ -102,6 +105,7 @@ static int gmux_update_status(struct backlight_device *bd)
}

static const struct backlight_ops gmux_bl_ops = {
.options = BL_CORE_SUSPENDRESUME,
.get_brightness = gmux_get_brightness,
.update_status = gmux_update_status,
};
Expand Down

0 comments on commit d0657b0

Please sign in to comment.