Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221740
b: refs/heads/master
c: c7ce250
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Linus Torvalds committed Nov 12, 2010
1 parent 25520c9 commit de47cf1
Show file tree
Hide file tree
Showing 2 changed files with 3 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: fef7764f8bca9d603a8a51dcb522db97739a33c2
refs/heads/master: c7ce2500e3140b728d8a98a1acb1c2690af51eae
4 changes: 2 additions & 2 deletions trunk/drivers/video/backlight/adp8860_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,15 +614,15 @@ static ssize_t adp8860_bl_ambient_light_zone_store(struct device *dev,
if (val == 0) {
/* Enable automatic ambient light sensing */
adp8860_set_bits(data->client, ADP8860_MDCR, CMP_AUTOEN);
} else if ((val > 0) && (val < 6)) {
} else if ((val > 0) && (val <= 3)) {
/* Disable automatic ambient light sensing */
adp8860_clr_bits(data->client, ADP8860_MDCR, CMP_AUTOEN);

/* Set user supplied ambient light zone */
mutex_lock(&data->lock);
adp8860_read(data->client, ADP8860_CFGR, &reg_val);
reg_val &= ~(CFGR_BLV_MASK << CFGR_BLV_SHIFT);
reg_val |= val << CFGR_BLV_SHIFT;
reg_val |= (val - 1) << CFGR_BLV_SHIFT;
adp8860_write(data->client, ADP8860_CFGR, reg_val);
mutex_unlock(&data->lock);
}
Expand Down

0 comments on commit de47cf1

Please sign in to comment.