fixes for gcc 4.6 (from Cyanogenmod/android_kernel_htc_msm8660)