Upstream changes for msm-sleeper
and build fixes/corrections (thanks @nobe1976!)

Signed-off-by: cj360 <ayunker551@gmail.com>