diff options
author | Michael Hennerich <[email protected]> | 2010-11-11 14:05:29 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2010-11-12 07:55:33 -0800 |
commit | c7ce2500e3140b728d8a98a1acb1c2690af51eae (patch) | |
tree | c656a165112af36bae03e9e43af9f64b4355788a /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | fef7764f8bca9d603a8a51dcb522db97739a33c2 (diff) |
drivers/video/backlight/adp8860_bl.c: fix ambient light zone overwrite handling
This affects the get/set of the current Ambient Light Zone. Reading
should return an integer between 1..3 (1 = Daylight, 2 = office, 3 =
dark). Writing a value between 1..3 forces the backlight controller to
enter the corresponding Ambient Light Zone. Writing 0 returns to normal
operation.
Fix valid range checking so we don't write invalid values to the
controller, and make sure we subtract 1, since this is what the register
definition (CFGR:BLV) requires. Otherwise the values written don't work
correctly.
Signed-off-by: Michael Hennerich <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
Acked-by: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions