Mer kernel adaptations from cyanogenmod sources.