diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-17 08:31:31 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-20 13:26:02 -0400 |
commit | 3561188ac29580bdc0e8db3cf3c029b87cf2c6cd (patch) | |
tree | 56bcd55d7cf3a07e7d334b2266a436f9641d66f5 /drivers/mtd | |
parent | ee663d929213c9f7e55c45229e9a01eeb8335b50 (diff) |
UBI: rename ubi_scan_add_used
The old name is not logical anymore - rename it to 'ubi_add_to_av()'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/ubi/scan.c | 9 | ||||
-rw-r--r-- | drivers/mtd/ubi/scan.h | 5 | ||||
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 7 |
3 files changed, 9 insertions, 12 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 06151fde2cc7..366506253502 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -425,7 +425,7 @@ out_free_vidh: | |||
425 | } | 425 | } |
426 | 426 | ||
427 | /** | 427 | /** |
428 | * ubi_scan_add_used - add physical eraseblock to the attaching information. | 428 | * ubi_add_to_av - add physical eraseblock to the attaching information. |
429 | * @ubi: UBI device description object | 429 | * @ubi: UBI device description object |
430 | * @ai: attaching information | 430 | * @ai: attaching information |
431 | * @pnum: the physical eraseblock number | 431 | * @pnum: the physical eraseblock number |
@@ -440,9 +440,8 @@ out_free_vidh: | |||
440 | * to be picked, while the older one has to be dropped. This function returns | 440 | * to be picked, while the older one has to be dropped. This function returns |
441 | * zero in case of success and a negative error code in case of failure. | 441 | * zero in case of success and a negative error code in case of failure. |
442 | */ | 442 | */ |
443 | int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_attach_info *ai, | 443 | int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum, |
444 | int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, | 444 | int ec, const struct ubi_vid_hdr *vid_hdr, int bitflips) |
445 | int bitflips) | ||
446 | { | 445 | { |
447 | int err, vol_id, lnum; | 446 | int err, vol_id, lnum; |
448 | unsigned long long sqnum; | 447 | unsigned long long sqnum; |
@@ -1016,7 +1015,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_attach_info *ai, | |||
1016 | if (ec_err) | 1015 | if (ec_err) |
1017 | ubi_warn("valid VID header but corrupted EC header at PEB %d", | 1016 | ubi_warn("valid VID header but corrupted EC header at PEB %d", |
1018 | pnum); | 1017 | pnum); |
1019 | err = ubi_scan_add_used(ubi, ai, pnum, ec, vidh, bitflips); | 1018 | err = ubi_add_to_av(ubi, ai, pnum, ec, vidh, bitflips); |
1020 | if (err) | 1019 | if (err) |
1021 | return err; | 1020 | return err; |
1022 | 1021 | ||
diff --git a/drivers/mtd/ubi/scan.h b/drivers/mtd/ubi/scan.h index ef6e903be8e0..5a9ecc0abdd2 100644 --- a/drivers/mtd/ubi/scan.h +++ b/drivers/mtd/ubi/scan.h | |||
@@ -157,9 +157,8 @@ static inline void ubi_scan_move_to_list(struct ubi_ainf_volume *av, | |||
157 | list_add_tail(&aeb->u.list, list); | 157 | list_add_tail(&aeb->u.list, list); |
158 | } | 158 | } |
159 | 159 | ||
160 | int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_attach_info *ai, | 160 | int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum, |
161 | int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, | 161 | int ec, const struct ubi_vid_hdr *vid_hdr, int bitflips); |
162 | int bitflips); | ||
163 | struct ubi_ainf_volume *ubi_scan_find_av(const struct ubi_attach_info *ai, | 162 | struct ubi_ainf_volume *ubi_scan_find_av(const struct ubi_attach_info *ai, |
164 | int vol_id); | 163 | int vol_id); |
165 | void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av); | 164 | void ubi_scan_rm_volume(struct ubi_attach_info *ai, struct ubi_ainf_volume *av); |
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 0ea105b1a68b..5decd587188b 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -338,10 +338,9 @@ retry: | |||
338 | 338 | ||
339 | /* | 339 | /* |
340 | * And add it to the attaching information. Don't delete the old version | 340 | * And add it to the attaching information. Don't delete the old version |
341 | * of this LEB as it will be deleted and freed in 'ubi_scan_add_used()'. | 341 | * of this LEB as it will be deleted and freed in 'ubi_add_to_av()'. |
342 | */ | 342 | */ |
343 | err = ubi_scan_add_used(ubi, ai, new_aeb->pnum, new_aeb->ec, | 343 | err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0); |
344 | vid_hdr, 0); | ||
345 | kfree(new_aeb); | 344 | kfree(new_aeb); |
346 | ubi_free_vid_hdr(ubi, vid_hdr); | 345 | ubi_free_vid_hdr(ubi, vid_hdr); |
347 | return err; | 346 | return err; |
@@ -428,7 +427,7 @@ static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi, | |||
428 | * aeb->scrub). If the data is not OK, the contents of | 427 | * aeb->scrub). If the data is not OK, the contents of |
429 | * the PEB will be recovered from the second copy, and | 428 | * the PEB will be recovered from the second copy, and |
430 | * aeb->scrub will be cleared in | 429 | * aeb->scrub will be cleared in |
431 | * 'ubi_scan_add_used()'. | 430 | * 'ubi_add_to_av()'. |
432 | */ | 431 | */ |
433 | aeb->scrub = 1; | 432 | aeb->scrub = 1; |
434 | else if (err) | 433 | else if (err) |