vendor/cm: unified patch from Jellaxy original branch