Fixed corruption of LCM registers
authorNicolas Dufresne <nicolas.dufresne@gmail.com>
Mon, 2 Mar 2009 10:45:59 +0000 (10:45 +0000)
committerAndy Green <agreen@octopus.localdomain>
Mon, 2 Mar 2009 10:45:59 +0000 (10:45 +0000)
commit6d4f252dce85b42042cfe0cc266f6568a859b4ff
treea4e6a249091ef499e91bf5000a6eee4a48a3573f
parenta6af63e826b79ae1ba2d8cbfa66805cc2dfe367c
Fixed corruption of LCM registers

Some registers where not set properly, or at the right time (thanks to Balaji
for his patch).

Weak locking could lead to corruption when using sysfs to switch state from
multiple threads or processes. The state transitions are now all atomic.

The driver attribute 'last_state' was used for same purpose of 'normal_state'.
Kept only 'normal_state' and used it in 'init_regs' instead of custom qvga
parameter.

This patch should fix bug #2235.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@gmail.com>
drivers/video/display/jbt6k74.c