提交 8d38a845 编写于 作者: S Simon Glass

mtd: Rename free() to rfree()

This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().
Signed-off-by: NSimon Glass <sjg@chromium.org>
上级 aae95882
...@@ -1179,10 +1179,10 @@ int mtd_ooblayout_free(struct mtd_info *mtd, int section, ...@@ -1179,10 +1179,10 @@ int mtd_ooblayout_free(struct mtd_info *mtd, int section,
if (!mtd || section < 0) if (!mtd || section < 0)
return -EINVAL; return -EINVAL;
if (!mtd->ooblayout || !mtd->ooblayout->free) if (!mtd->ooblayout || !mtd->ooblayout->rfree)
return -ENOTSUPP; return -ENOTSUPP;
return mtd->ooblayout->free(mtd, section, oobfree); return mtd->ooblayout->rfree(mtd, section, oobfree);
} }
EXPORT_SYMBOL_GPL(mtd_ooblayout_free); EXPORT_SYMBOL_GPL(mtd_ooblayout_free);
......
...@@ -1156,7 +1156,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section, ...@@ -1156,7 +1156,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section,
static const struct mtd_ooblayout_ops denali_ooblayout_ops = { static const struct mtd_ooblayout_ops denali_ooblayout_ops = {
.ecc = denali_ooblayout_ecc, .ecc = denali_ooblayout_ecc,
.free = denali_ooblayout_free, .rfree = denali_ooblayout_free,
}; };
static int denali_multidev_fixup(struct denali_nand_info *denali) static int denali_multidev_fixup(struct denali_nand_info *denali)
......
...@@ -1021,7 +1021,7 @@ static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section, ...@@ -1021,7 +1021,7 @@ static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section,
static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = { static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = {
.ecc = spinand_noecc_ooblayout_ecc, .ecc = spinand_noecc_ooblayout_ecc,
.free = spinand_noecc_ooblayout_free, .rfree = spinand_noecc_ooblayout_free,
}; };
static int spinand_init(struct spinand_device *spinand) static int spinand_init(struct spinand_device *spinand)
......
...@@ -103,7 +103,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand, ...@@ -103,7 +103,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand,
static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = { static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = {
.ecc = gd5fxgq4xexxg_ooblayout_ecc, .ecc = gd5fxgq4xexxg_ooblayout_ecc,
.free = gd5fxgq4xexxg_ooblayout_free, .rfree = gd5fxgq4xexxg_ooblayout_free,
}; };
static const struct spinand_info gigadevice_spinand_table[] = { static const struct spinand_info gigadevice_spinand_table[] = {
......
...@@ -47,7 +47,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section, ...@@ -47,7 +47,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section,
static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = { static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = {
.ecc = mx35lfxge4ab_ooblayout_ecc, .ecc = mx35lfxge4ab_ooblayout_ecc,
.free = mx35lfxge4ab_ooblayout_free, .rfree = mx35lfxge4ab_ooblayout_free,
}; };
static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *eccsr) static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *eccsr)
......
...@@ -63,7 +63,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section, ...@@ -63,7 +63,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section,
static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = { static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = {
.ecc = mt29f2g01abagd_ooblayout_ecc, .ecc = mt29f2g01abagd_ooblayout_ecc,
.free = mt29f2g01abagd_ooblayout_free, .rfree = mt29f2g01abagd_ooblayout_free,
}; };
static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand, static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand,
......
...@@ -59,7 +59,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section, ...@@ -59,7 +59,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section,
static const struct mtd_ooblayout_ops w25m02gv_ooblayout = { static const struct mtd_ooblayout_ops w25m02gv_ooblayout = {
.ecc = w25m02gv_ooblayout_ecc, .ecc = w25m02gv_ooblayout_ecc,
.free = w25m02gv_ooblayout_free, .rfree = w25m02gv_ooblayout_free,
}; };
static int w25m02gv_select_target(struct spinand_device *spinand, static int w25m02gv_select_target(struct spinand_device *spinand,
......
...@@ -129,7 +129,7 @@ struct mtd_oob_region { ...@@ -129,7 +129,7 @@ struct mtd_oob_region {
struct mtd_ooblayout_ops { struct mtd_ooblayout_ops {
int (*ecc)(struct mtd_info *mtd, int section, int (*ecc)(struct mtd_info *mtd, int section,
struct mtd_oob_region *oobecc); struct mtd_oob_region *oobecc);
int (*free)(struct mtd_info *mtd, int section, int (*rfree)(struct mtd_info *mtd, int section,
struct mtd_oob_region *oobfree); struct mtd_oob_region *oobfree);
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册