diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-17 08:20:28 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-20 13:26:02 -0400 |
commit | 13d33dad35c2a168d17cc993ea496b8eb9dd9624 (patch) | |
tree | b8d39f8539cb125ccea4b0f5244d9c00735a2b57 | |
parent | 517af48c0540e61bbe0ebbb5f463afe937b73894 (diff) |
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>
-rw-r--r-- | drivers/mtd/ubi/scan.c | 8 | ||||
-rw-r--r-- | drivers/mtd/ubi/scan.h | 2 |
2 files changed, 4 insertions, 6 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) | |||
667 | } | 667 | } |
668 | 668 | ||
669 | /** | 669 | /** |
670 | * ubi_scan_erase_peb - erase a physical eraseblock. | 670 | * early_erase_peb - erase a physical eraseblock. |
671 | * @ubi: UBI device description object | 671 | * @ubi: UBI device description object |
672 | * @ai: attaching information | 672 | * @ai: attaching information |
673 | * @pnum: physical eraseblock number to erase; | 673 | * @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) | |||
679 | * This function returns zero in case of success and a negative error code in | 679 | * This function returns zero in case of success and a negative error code in |
680 | * case of failure. | 680 | * case of failure. |
681 | */ | 681 | */ |
682 | int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_attach_info *ai, | 682 | static int early_erase_peb(struct ubi_device *ubi, |
683 | int pnum, int ec) | 683 | const struct ubi_attach_info *ai, int pnum, int ec) |
684 | { | 684 | { |
685 | int err; | 685 | int err; |
686 | struct ubi_ec_hdr *ec_hdr; | 686 | struct ubi_ec_hdr *ec_hdr; |
@@ -748,7 +748,7 @@ struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, | |||
748 | if (aeb->ec == UBI_SCAN_UNKNOWN_EC) | 748 | if (aeb->ec == UBI_SCAN_UNKNOWN_EC) |
749 | aeb->ec = ai->mean_ec; | 749 | aeb->ec = ai->mean_ec; |
750 | 750 | ||
751 | err = ubi_scan_erase_peb(ubi, ai, aeb->pnum, aeb->ec+1); | 751 | err = early_erase_peb(ubi, ai, aeb->pnum, aeb->ec+1); |
752 | if (err) | 752 | if (err) |
753 | continue; | 753 | continue; |
754 | 754 | ||
diff --git a/drivers/mtd/ubi/scan.h b/drivers/mtd/ubi/scan.h index 3e19cb665a55..59ed0750cef8 100644 --- a/drivers/mtd/ubi/scan.h +++ b/drivers/mtd/ubi/scan.h | |||
@@ -167,8 +167,6 @@ struct ubi_ainf_peb *ubi_scan_find_aeb(const struct ubi_ainf_volume *av, | |||
167 | void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av); | 167 | void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av); |
168 | struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, | 168 | struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, |
169 | struct ubi_attach_info *ai); | 169 | struct ubi_attach_info *ai); |
170 | int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_attach_info *ai, | ||
171 | int pnum, int ec); | ||
172 | struct ubi_attach_info *ubi_scan(struct ubi_device *ubi); | 170 | struct ubi_attach_info *ubi_scan(struct ubi_device *ubi); |
173 | void ubi_scan_destroy_ai(struct ubi_attach_info *ai); | 171 | void ubi_scan_destroy_ai(struct ubi_attach_info *ai); |
174 | 172 | ||