Assorted changes copied from S4 CM kernel

Change-Id: Iefe5175640d4900ff493bbb237c511a22d51574f