Added check to ensure LID is in a closed state before proceeding
with suspend-to-RAM.  This is to fix a race condition where if
the LID is reopened instantaneously after being closed, two LID
events get generated (first for LID close and second for LID open).
The second event makes the system go back to sleep since the LID
state is not being checked.

BUG=1961
TEST=manual testing on x200 to make system go to suspend on closing LID

Review URL: http://codereview.chromium.org/1084013
1 file changed