aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2012-09-26 11:51:43 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-10-03 05:29:37 -0400
commita7306653705e456c8affeb4efe9542b9f6b757ad (patch)
tree6e04a569891a86d068f736283268934b553c2f20 /drivers/mtd/ubi
parent5638b33abffd967dda4f984a247925b7af38b23d (diff)
UBI: Export next_sqnum()
Fastmap needs next_sqnum(), rename it to ubi_next_sqnum() and make it non-static. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/eba.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index a26d7d253174..0910c2cece5e 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -57,7 +57,7 @@
57 * global sequence counter value. It also increases the global sequence 57 * global sequence counter value. It also increases the global sequence
58 * counter. 58 * counter.
59 */ 59 */
60static unsigned long long next_sqnum(struct ubi_device *ubi) 60unsigned long long ubi_next_sqnum(struct ubi_device *ubi)
61{ 61{
62 unsigned long long sqnum; 62 unsigned long long sqnum;
63 63
@@ -521,7 +521,7 @@ retry:
521 goto out_put; 521 goto out_put;
522 } 522 }
523 523
524 vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi)); 524 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
525 err = ubi_io_write_vid_hdr(ubi, new_pnum, vid_hdr); 525 err = ubi_io_write_vid_hdr(ubi, new_pnum, vid_hdr);
526 if (err) 526 if (err)
527 goto write_error; 527 goto write_error;
@@ -632,7 +632,7 @@ int ubi_eba_write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
632 } 632 }
633 633
634 vid_hdr->vol_type = UBI_VID_DYNAMIC; 634 vid_hdr->vol_type = UBI_VID_DYNAMIC;
635 vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi)); 635 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
636 vid_hdr->vol_id = cpu_to_be32(vol_id); 636 vid_hdr->vol_id = cpu_to_be32(vol_id);
637 vid_hdr->lnum = cpu_to_be32(lnum); 637 vid_hdr->lnum = cpu_to_be32(lnum);
638 vid_hdr->compat = ubi_get_compat(ubi, vol_id); 638 vid_hdr->compat = ubi_get_compat(ubi, vol_id);
@@ -692,7 +692,7 @@ write_error:
692 return err; 692 return err;
693 } 693 }
694 694
695 vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi)); 695 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
696 ubi_msg("try another PEB"); 696 ubi_msg("try another PEB");
697 goto retry; 697 goto retry;
698} 698}
@@ -745,7 +745,7 @@ int ubi_eba_write_leb_st(struct ubi_device *ubi, struct ubi_volume *vol,
745 return err; 745 return err;
746 } 746 }
747 747
748 vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi)); 748 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
749 vid_hdr->vol_id = cpu_to_be32(vol_id); 749 vid_hdr->vol_id = cpu_to_be32(vol_id);
750 vid_hdr->lnum = cpu_to_be32(lnum); 750 vid_hdr->lnum = cpu_to_be32(lnum);
751 vid_hdr->compat = ubi_get_compat(ubi, vol_id); 751 vid_hdr->compat = ubi_get_compat(ubi, vol_id);
@@ -810,7 +810,7 @@ write_error:
810 return err; 810 return err;
811 } 811 }
812 812
813 vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi)); 813 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
814 ubi_msg("try another PEB"); 814 ubi_msg("try another PEB");
815 goto retry; 815 goto retry;
816} 816}
@@ -862,7 +862,7 @@ int ubi_eba_atomic_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
862 if (err) 862 if (err)
863 goto out_mutex; 863 goto out_mutex;
864 864
865 vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi)); 865 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
866 vid_hdr->vol_id = cpu_to_be32(vol_id); 866 vid_hdr->vol_id = cpu_to_be32(vol_id);
867 vid_hdr->lnum = cpu_to_be32(lnum); 867 vid_hdr->lnum = cpu_to_be32(lnum);
868 vid_hdr->compat = ubi_get_compat(ubi, vol_id); 868 vid_hdr->compat = ubi_get_compat(ubi, vol_id);
@@ -930,7 +930,7 @@ write_error:
930 goto out_leb_unlock; 930 goto out_leb_unlock;
931 } 931 }
932 932
933 vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi)); 933 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
934 ubi_msg("try another PEB"); 934 ubi_msg("try another PEB");
935 goto retry; 935 goto retry;
936} 936}
@@ -1089,7 +1089,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
1089 vid_hdr->data_size = cpu_to_be32(data_size); 1089 vid_hdr->data_size = cpu_to_be32(data_size);
1090 vid_hdr->data_crc = cpu_to_be32(crc); 1090 vid_hdr->data_crc = cpu_to_be32(crc);
1091 } 1091 }
1092 vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi)); 1092 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
1093 1093
1094 err = ubi_io_write_vid_hdr(ubi, to, vid_hdr); 1094 err = ubi_io_write_vid_hdr(ubi, to, vid_hdr);
1095 if (err) { 1095 if (err) {