mtd: Rename free() to rfree()
authorSimon Glass <sjg@chromium.org>
Mon, 3 Feb 2020 14:35:56 +0000 (07:35 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Feb 2020 02:33:46 +0000 (19:33 -0700)
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: Simon Glass <sjg@chromium.org>
drivers/mtd/mtdcore.c
drivers/mtd/nand/raw/denali.c
drivers/mtd/nand/spi/core.c
drivers/mtd/nand/spi/gigadevice.c
drivers/mtd/nand/spi/macronix.c
drivers/mtd/nand/spi/micron.c
drivers/mtd/nand/spi/winbond.c
include/linux/mtd/mtd.h

index dd04d676d56c37199fee42056484248d75c6c763..838c2883186cf6ca6799dac28cc0536efa24579c 100644 (file)
@@ -1179,10 +1179,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);
 
index be1b3627ad0878711c05212d8e2ec0388853c21a..b5a98f52f8a55c40ba2174911ea2c607f60fab60 100644 (file)
@@ -1156,7 +1156,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section,
 
 static const struct mtd_ooblayout_ops denali_ooblayout_ops = {
        .ecc = denali_ooblayout_ecc,
-       .free = denali_ooblayout_free,
+       .rfree = denali_ooblayout_free,
 };
 
 static int denali_multidev_fixup(struct denali_nand_info *denali)
index cb8ffa3fa96a16dd40dda3553bbb171107e71df7..fba8cc056aa83dd47ded1ecd44c71de3c1ea448a 100644 (file)
@@ -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 = {
        .ecc = spinand_noecc_ooblayout_ecc,
-       .free = spinand_noecc_ooblayout_free,
+       .rfree = spinand_noecc_ooblayout_free,
 };
 
 static int spinand_init(struct spinand_device *spinand)
index 3681c5eed9acf0ebc38f34350c706cec2b6731ac..e329c3cfc0d95b38a0a3c3110de9888253dea6e1 100644 (file)
@@ -103,7 +103,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand,
 
 static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = {
        .ecc = gd5fxgq4xexxg_ooblayout_ecc,
-       .free = gd5fxgq4xexxg_ooblayout_free,
+       .rfree = gd5fxgq4xexxg_ooblayout_free,
 };
 
 static const struct spinand_info gigadevice_spinand_table[] = {
index 662c561e501b150ab84a12f958b684540dfbda41..1119677f6f601b8f9470b922c6dfae525f4b2460 100644 (file)
@@ -47,7 +47,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section,
 
 static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = {
        .ecc = mx35lfxge4ab_ooblayout_ecc,
-       .free = mx35lfxge4ab_ooblayout_free,
+       .rfree = mx35lfxge4ab_ooblayout_free,
 };
 
 static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *eccsr)
index 83951c5d0f7290ff195d55977ea559ee7aae7c56..9c24542f962153e081eaeacec2863c679ecb5e4c 100644 (file)
@@ -63,7 +63,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section,
 
 static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = {
        .ecc = mt29f2g01abagd_ooblayout_ecc,
-       .free = mt29f2g01abagd_ooblayout_free,
+       .rfree = mt29f2g01abagd_ooblayout_free,
 };
 
 static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand,
index 6ba8bc5c7b8c25c8a0c7b975b9a170496014c137..de9352e48f1c8b6e4c8ca26f1e800fe93c516ba6 100644 (file)
@@ -59,7 +59,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section,
 
 static const struct mtd_ooblayout_ops w25m02gv_ooblayout = {
        .ecc = w25m02gv_ooblayout_ecc,
-       .free = w25m02gv_ooblayout_free,
+       .rfree = w25m02gv_ooblayout_free,
 };
 
 static int w25m02gv_select_target(struct spinand_device *spinand,
index ceffd994de8f2e4976c53d036ab67fc7fa113252..1b9151714c0bf11828c8779f3555887b29cae4c8 100644 (file)
@@ -129,8 +129,8 @@ struct mtd_oob_region {
 struct mtd_ooblayout_ops {
        int (*ecc)(struct mtd_info *mtd, int section,
                   struct mtd_oob_region *oobecc);
-       int (*free)(struct mtd_info *mtd, int section,
-                   struct mtd_oob_region *oobfree);
+       int (*rfree)(struct mtd_info *mtd, int section,
+                    struct mtd_oob_region *oobfree);
 };
 
 /*