diff options
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r-- | drivers/mtd/mtdcore.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index dd04d676d5..f8d3f4d246 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -9,6 +9,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/ptrace.h> @@ -1179,10 +1180,10 @@ int mtd_ooblayout_free(struct mtd_info *mtd, int section, if (!mtd || section < 0) return -EINVAL; - if (!mtd->ooblayout || !mtd->ooblayout->free) + if (!mtd->ooblayout || !mtd->ooblayout->rfree) return -ENOTSUPP; - return mtd->ooblayout->free(mtd, section, oobfree); + return mtd->ooblayout->rfree(mtd, section, oobfree); } EXPORT_SYMBOL_GPL(mtd_ooblayout_free); |