summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/scan.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-17 16:20:28 +0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-20 21:26:02 +0400
commit13d33dad35c2a168d17cc993ea496b8eb9dd9624 (patch)
treeb8d39f8539cb125ccea4b0f5244d9c00735a2b57 /drivers/mtd/ubi/scan.c
parent517af48c0540e61bbe0ebbb5f463afe937b73894 (diff)
downloadlinux-13d33dad35c2a168d17cc993ea496b8eb9dd9624.tar.xz
UBI: make ubi_scan_erase_peb static and rename
The 'ubi_scan_erase_peb()' is used only in scan.c so can be static. Also re-name it to 'early_erase_peb()' because we tend to use "ubi_" prefix only for non-static fuction and also because the new name is better. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r--drivers/mtd/ubi/scan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 795d5ed70424..c5501652fdf9 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -667,7 +667,7 @@ void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av)
}
/**
- * ubi_scan_erase_peb - erase a physical eraseblock.
+ * early_erase_peb - erase a physical eraseblock.
* @ubi: UBI device description object
* @ai: attaching information
* @pnum: physical eraseblock number to erase;
@@ -679,8 +679,8 @@ void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av)
* This function returns zero in case of success and a negative error code in
* case of failure.
*/
-int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_attach_info *ai,
- int pnum, int ec)
+static int early_erase_peb(struct ubi_device *ubi,
+ const struct ubi_attach_info *ai, int pnum, int ec)
{
int err;
struct ubi_ec_hdr *ec_hdr;
@@ -748,7 +748,7 @@ struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi,
if (aeb->ec == UBI_SCAN_UNKNOWN_EC)
aeb->ec = ai->mean_ec;
- err = ubi_scan_erase_peb(ubi, ai, aeb->pnum, aeb->ec+1);
+ err = early_erase_peb(ubi, ai, aeb->pnum, aeb->ec+1);
if (err)
continue;