backported the MTD driver