diff options
author | Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> | 2012-05-17 00:46:17 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-20 13:26:01 -0400 |
commit | afc15a814b9b5879ec361b76d45f68dc3b2cd4c1 (patch) | |
tree | 29b95910f86e0234f675d147e3f2aae2eb69831e /drivers/mtd | |
parent | cb28a9322dd26cb6c29b7dda9a42626daca1024a (diff) |
UBI: rename struct ubi_scan_info
Rename 'struct ubi_scan_info' to 'struct ubi_attach_info'. This is part
of the code re-structuring I am trying to do in order to add fastmap
in a more logical way. Fastmap can share a lot with scanning, including
the attach-time data structures, which all now have "scan" word in the
name. Let's get rid of this word.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/ubi/build.c | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/eba.c | 4 | ||||
-rw-r--r-- | drivers/mtd/ubi/scan.c | 41 | ||||
-rw-r--r-- | drivers/mtd/ubi/scan.h | 18 | ||||
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 6 | ||||
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 13 | ||||
-rw-r--r-- | drivers/mtd/ubi/wl.c | 2 |
7 files changed, 44 insertions, 42 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 3d555975e482..4e715df8bd00 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -583,7 +583,7 @@ static void free_internal_volumes(struct ubi_device *ubi) | |||
583 | static int attach_by_scanning(struct ubi_device *ubi) | 583 | static int attach_by_scanning(struct ubi_device *ubi) |
584 | { | 584 | { |
585 | int err; | 585 | int err; |
586 | struct ubi_scan_info *si; | 586 | struct ubi_attach_info *si; |
587 | 587 | ||
588 | si = ubi_scan(ubi); | 588 | si = ubi_scan(ubi); |
589 | if (IS_ERR(si)) | 589 | if (IS_ERR(si)) |
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index c8500cb9aaf4..264482fc78a0 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c | |||
@@ -1182,7 +1182,7 @@ out_unlock_leb: | |||
1182 | * reported by real users. | 1182 | * reported by real users. |
1183 | */ | 1183 | */ |
1184 | static void print_rsvd_warning(struct ubi_device *ubi, | 1184 | static void print_rsvd_warning(struct ubi_device *ubi, |
1185 | struct ubi_scan_info *si) | 1185 | struct ubi_attach_info *si) |
1186 | { | 1186 | { |
1187 | /* | 1187 | /* |
1188 | * The 1 << 18 (256KiB) number is picked randomly, just a reasonably | 1188 | * The 1 << 18 (256KiB) number is picked randomly, just a reasonably |
@@ -1212,7 +1212,7 @@ static void print_rsvd_warning(struct ubi_device *ubi, | |||
1212 | * This function returns zero in case of success and a negative error code in | 1212 | * This function returns zero in case of success and a negative error code in |
1213 | * case of failure. | 1213 | * case of failure. |
1214 | */ | 1214 | */ |
1215 | int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si) | 1215 | int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_attach_info *si) |
1216 | { | 1216 | { |
1217 | int i, j, err, num_volumes; | 1217 | int i, j, err, num_volumes; |
1218 | struct ubi_ainf_volume *sv; | 1218 | struct ubi_ainf_volume *sv; |
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 5a2a0175a770..c9891776eb27 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * This sub-system is responsible for scanning the flash media, checking UBI | 24 | * This sub-system is responsible for scanning the flash media, checking UBI |
25 | * headers and providing complete information about the UBI flash image. | 25 | * headers and providing complete information about the UBI flash image. |
26 | * | 26 | * |
27 | * The scanning information is represented by a &struct ubi_scan_info' object. | 27 | * The scanning information is represented by a &struct ubi_attach_info' object. |
28 | * Information about found volumes is represented by &struct ubi_ainf_volume | 28 | * Information about found volumes is represented by &struct ubi_ainf_volume |
29 | * objects which are kept in volume RB-tree with root at the @volumes field. | 29 | * objects which are kept in volume RB-tree with root at the @volumes field. |
30 | * The RB-tree is indexed by the volume ID. | 30 | * The RB-tree is indexed by the volume ID. |
@@ -88,7 +88,7 @@ | |||
88 | #include <linux/random.h> | 88 | #include <linux/random.h> |
89 | #include "ubi.h" | 89 | #include "ubi.h" |
90 | 90 | ||
91 | static int self_check_si(struct ubi_device *ubi, struct ubi_scan_info *si); | 91 | static int self_check_si(struct ubi_device *ubi, struct ubi_attach_info *si); |
92 | 92 | ||
93 | /* Temporary variables used during scanning */ | 93 | /* Temporary variables used during scanning */ |
94 | static struct ubi_ec_hdr *ech; | 94 | static struct ubi_ec_hdr *ech; |
@@ -110,8 +110,8 @@ static struct ubi_vid_hdr *vidh; | |||
110 | * returns zero in case of success and a negative error code in case of | 110 | * returns zero in case of success and a negative error code in case of |
111 | * failure. | 111 | * failure. |
112 | */ | 112 | */ |
113 | static int add_to_list(struct ubi_scan_info *si, int pnum, int ec, int to_head, | 113 | static int add_to_list(struct ubi_attach_info *si, int pnum, int ec, |
114 | struct list_head *list) | 114 | int to_head, struct list_head *list) |
115 | { | 115 | { |
116 | struct ubi_ainf_peb *seb; | 116 | struct ubi_ainf_peb *seb; |
117 | 117 | ||
@@ -148,7 +148,7 @@ static int add_to_list(struct ubi_scan_info *si, int pnum, int ec, int to_head, | |||
148 | * The corruption was presumably not caused by a power cut. Returns zero in | 148 | * The corruption was presumably not caused by a power cut. Returns zero in |
149 | * case of success and a negative error code in case of failure. | 149 | * case of success and a negative error code in case of failure. |
150 | */ | 150 | */ |
151 | static int add_corrupted(struct ubi_scan_info *si, int pnum, int ec) | 151 | static int add_corrupted(struct ubi_attach_info *si, int pnum, int ec) |
152 | { | 152 | { |
153 | struct ubi_ainf_peb *seb; | 153 | struct ubi_ainf_peb *seb; |
154 | 154 | ||
@@ -244,8 +244,8 @@ bad: | |||
244 | * to the scanning volume object in case of success and a negative error code | 244 | * to the scanning volume object in case of success and a negative error code |
245 | * in case of failure. | 245 | * in case of failure. |
246 | */ | 246 | */ |
247 | static struct ubi_ainf_volume *add_volume(struct ubi_scan_info *si, int vol_id, | 247 | static struct ubi_ainf_volume *add_volume(struct ubi_attach_info *si, |
248 | int pnum, | 248 | int vol_id, int pnum, |
249 | const struct ubi_vid_hdr *vid_hdr) | 249 | const struct ubi_vid_hdr *vid_hdr) |
250 | { | 250 | { |
251 | struct ubi_ainf_volume *sv; | 251 | struct ubi_ainf_volume *sv; |
@@ -440,7 +440,7 @@ 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_scan_info *si, | 443 | int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_attach_info *si, |
444 | int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, | 444 | int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, |
445 | int bitflips) | 445 | int bitflips) |
446 | { | 446 | { |
@@ -593,7 +593,7 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si, | |||
593 | * This function returns a pointer to the volume description or %NULL if there | 593 | * This function returns a pointer to the volume description or %NULL if there |
594 | * are no data about this volume in the scanning information. | 594 | * are no data about this volume in the scanning information. |
595 | */ | 595 | */ |
596 | struct ubi_ainf_volume *ubi_scan_find_sv(const struct ubi_scan_info *si, | 596 | struct ubi_ainf_volume *ubi_scan_find_sv(const struct ubi_attach_info *si, |
597 | int vol_id) | 597 | int vol_id) |
598 | { | 598 | { |
599 | struct ubi_ainf_volume *sv; | 599 | struct ubi_ainf_volume *sv; |
@@ -648,7 +648,7 @@ struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_ainf_volume *sv, | |||
648 | * @si: scanning information | 648 | * @si: scanning information |
649 | * @sv: the volume scanning information to delete | 649 | * @sv: the volume scanning information to delete |
650 | */ | 650 | */ |
651 | void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_ainf_volume *sv) | 651 | void ubi_scan_rm_volume(struct ubi_attach_info *si, struct ubi_ainf_volume *sv) |
652 | { | 652 | { |
653 | struct rb_node *rb; | 653 | struct rb_node *rb; |
654 | struct ubi_ainf_peb *seb; | 654 | struct ubi_ainf_peb *seb; |
@@ -679,7 +679,7 @@ void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_ainf_volume *sv) | |||
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_scan_info *si, | 682 | int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_attach_info *si, |
683 | int pnum, int ec) | 683 | int pnum, int ec) |
684 | { | 684 | { |
685 | int err; | 685 | int err; |
@@ -726,7 +726,7 @@ out_free: | |||
726 | * success and an error code in case of failure. | 726 | * success and an error code in case of failure. |
727 | */ | 727 | */ |
728 | struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, | 728 | struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, |
729 | struct ubi_scan_info *si) | 729 | struct ubi_attach_info *si) |
730 | { | 730 | { |
731 | int err = 0; | 731 | int err = 0; |
732 | struct ubi_ainf_peb *seb, *tmp_seb; | 732 | struct ubi_ainf_peb *seb, *tmp_seb; |
@@ -831,7 +831,7 @@ out_unlock: | |||
831 | * This function returns a zero if the physical eraseblock was successfully | 831 | * This function returns a zero if the physical eraseblock was successfully |
832 | * handled and a negative error code in case of failure. | 832 | * handled and a negative error code in case of failure. |
833 | */ | 833 | */ |
834 | static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, | 834 | static int process_eb(struct ubi_device *ubi, struct ubi_attach_info *si, |
835 | int pnum) | 835 | int pnum) |
836 | { | 836 | { |
837 | long long uninitialized_var(ec); | 837 | long long uninitialized_var(ec); |
@@ -1073,7 +1073,8 @@ adjust_mean_ec: | |||
1073 | * MTD device. Returns zero if we should proceed with attaching the MTD device, | 1073 | * MTD device. Returns zero if we should proceed with attaching the MTD device, |
1074 | * and %-EINVAL if we should not. | 1074 | * and %-EINVAL if we should not. |
1075 | */ | 1075 | */ |
1076 | static int check_what_we_have(struct ubi_device *ubi, struct ubi_scan_info *si) | 1076 | static int check_what_we_have(struct ubi_device *ubi, |
1077 | struct ubi_attach_info *si) | ||
1077 | { | 1078 | { |
1078 | struct ubi_ainf_peb *seb; | 1079 | struct ubi_ainf_peb *seb; |
1079 | int max_corr, peb_count; | 1080 | int max_corr, peb_count; |
@@ -1143,15 +1144,15 @@ static int check_what_we_have(struct ubi_device *ubi, struct ubi_scan_info *si) | |||
1143 | * This function does full scanning of an MTD device and returns complete | 1144 | * This function does full scanning of an MTD device and returns complete |
1144 | * information about it. In case of failure, an error code is returned. | 1145 | * information about it. In case of failure, an error code is returned. |
1145 | */ | 1146 | */ |
1146 | struct ubi_scan_info *ubi_scan(struct ubi_device *ubi) | 1147 | struct ubi_attach_info *ubi_scan(struct ubi_device *ubi) |
1147 | { | 1148 | { |
1148 | int err, pnum; | 1149 | int err, pnum; |
1149 | struct rb_node *rb1, *rb2; | 1150 | struct rb_node *rb1, *rb2; |
1150 | struct ubi_ainf_volume *sv; | 1151 | struct ubi_ainf_volume *sv; |
1151 | struct ubi_ainf_peb *seb; | 1152 | struct ubi_ainf_peb *seb; |
1152 | struct ubi_scan_info *si; | 1153 | struct ubi_attach_info *si; |
1153 | 1154 | ||
1154 | si = kzalloc(sizeof(struct ubi_scan_info), GFP_KERNEL); | 1155 | si = kzalloc(sizeof(struct ubi_attach_info), GFP_KERNEL); |
1155 | if (!si) | 1156 | if (!si) |
1156 | return ERR_PTR(-ENOMEM); | 1157 | return ERR_PTR(-ENOMEM); |
1157 | 1158 | ||
@@ -1244,7 +1245,7 @@ out_si: | |||
1244 | * This function destroys the volume RB-tree (@sv->root) and the scanning | 1245 | * This function destroys the volume RB-tree (@sv->root) and the scanning |
1245 | * volume information. | 1246 | * volume information. |
1246 | */ | 1247 | */ |
1247 | static void destroy_sv(struct ubi_scan_info *si, struct ubi_ainf_volume *sv) | 1248 | static void destroy_sv(struct ubi_attach_info *si, struct ubi_ainf_volume *sv) |
1248 | { | 1249 | { |
1249 | struct ubi_ainf_peb *seb; | 1250 | struct ubi_ainf_peb *seb; |
1250 | struct rb_node *this = sv->root.rb_node; | 1251 | struct rb_node *this = sv->root.rb_node; |
@@ -1274,7 +1275,7 @@ static void destroy_sv(struct ubi_scan_info *si, struct ubi_ainf_volume *sv) | |||
1274 | * ubi_scan_destroy_si - destroy scanning information. | 1275 | * ubi_scan_destroy_si - destroy scanning information. |
1275 | * @si: scanning information | 1276 | * @si: scanning information |
1276 | */ | 1277 | */ |
1277 | void ubi_scan_destroy_si(struct ubi_scan_info *si) | 1278 | void ubi_scan_destroy_si(struct ubi_attach_info *si) |
1278 | { | 1279 | { |
1279 | struct ubi_ainf_peb *seb, *seb_tmp; | 1280 | struct ubi_ainf_peb *seb, *seb_tmp; |
1280 | struct ubi_ainf_volume *sv; | 1281 | struct ubi_ainf_volume *sv; |
@@ -1333,7 +1334,7 @@ void ubi_scan_destroy_si(struct ubi_scan_info *si) | |||
1333 | * This function returns zero if the scanning information is all right, and a | 1334 | * This function returns zero if the scanning information is all right, and a |
1334 | * negative error code if not or if an error occurred. | 1335 | * negative error code if not or if an error occurred. |
1335 | */ | 1336 | */ |
1336 | static int self_check_si(struct ubi_device *ubi, struct ubi_scan_info *si) | 1337 | static int self_check_si(struct ubi_device *ubi, struct ubi_attach_info *si) |
1337 | { | 1338 | { |
1338 | int pnum, err, vols_found = 0; | 1339 | int pnum, err, vols_found = 0; |
1339 | struct rb_node *rb1, *rb2; | 1340 | struct rb_node *rb1, *rb2; |
diff --git a/drivers/mtd/ubi/scan.h b/drivers/mtd/ubi/scan.h index 5523f0b0fe1d..d32f18315a0e 100644 --- a/drivers/mtd/ubi/scan.h +++ b/drivers/mtd/ubi/scan.h | |||
@@ -86,7 +86,7 @@ struct ubi_ainf_volume { | |||
86 | }; | 86 | }; |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * struct ubi_scan_info - UBI scanning information. | 89 | * struct ubi_attach_info - UBI scanning information. |
90 | * @volumes: root of the volume RB-tree | 90 | * @volumes: root of the volume RB-tree |
91 | * @corr: list of corrupted physical eraseblocks | 91 | * @corr: list of corrupted physical eraseblocks |
92 | * @free: list of free physical eraseblocks | 92 | * @free: list of free physical eraseblocks |
@@ -115,7 +115,7 @@ struct ubi_ainf_volume { | |||
115 | * UBI sub-systems to build final UBI data structures, further error-recovery | 115 | * UBI sub-systems to build final UBI data structures, further error-recovery |
116 | * and so on. | 116 | * and so on. |
117 | */ | 117 | */ |
118 | struct ubi_scan_info { | 118 | struct ubi_attach_info { |
119 | struct rb_root volumes; | 119 | struct rb_root volumes; |
120 | struct list_head corr; | 120 | struct list_head corr; |
121 | struct list_head free; | 121 | struct list_head free; |
@@ -156,19 +156,19 @@ static inline void ubi_scan_move_to_list(struct ubi_ainf_volume *sv, | |||
156 | list_add_tail(&seb->u.list, list); | 156 | list_add_tail(&seb->u.list, list); |
157 | } | 157 | } |
158 | 158 | ||
159 | int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si, | 159 | int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_attach_info *si, |
160 | int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, | 160 | int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, |
161 | int bitflips); | 161 | int bitflips); |
162 | struct ubi_ainf_volume *ubi_scan_find_sv(const struct ubi_scan_info *si, | 162 | struct ubi_ainf_volume *ubi_scan_find_sv(const struct ubi_attach_info *si, |
163 | int vol_id); | 163 | int vol_id); |
164 | struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_ainf_volume *sv, | 164 | struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_ainf_volume *sv, |
165 | int lnum); | 165 | int lnum); |
166 | void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_ainf_volume *sv); | 166 | void ubi_scan_rm_volume(struct ubi_attach_info *si, struct ubi_ainf_volume *sv); |
167 | struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, | 167 | struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi, |
168 | struct ubi_scan_info *si); | 168 | struct ubi_attach_info *si); |
169 | int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_scan_info *si, | 169 | int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_attach_info *si, |
170 | int pnum, int ec); | 170 | int pnum, int ec); |
171 | struct ubi_scan_info *ubi_scan(struct ubi_device *ubi); | 171 | struct ubi_attach_info *ubi_scan(struct ubi_device *ubi); |
172 | void ubi_scan_destroy_si(struct ubi_scan_info *si); | 172 | void ubi_scan_destroy_si(struct ubi_attach_info *si); |
173 | 173 | ||
174 | #endif /* !__UBI_SCAN_H__ */ | 174 | #endif /* !__UBI_SCAN_H__ */ |
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 75b9f1c61b78..0f206517d811 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -489,7 +489,7 @@ int ubi_change_vtbl_record(struct ubi_device *ubi, int idx, | |||
489 | struct ubi_vtbl_record *vtbl_rec); | 489 | struct ubi_vtbl_record *vtbl_rec); |
490 | int ubi_vtbl_rename_volumes(struct ubi_device *ubi, | 490 | int ubi_vtbl_rename_volumes(struct ubi_device *ubi, |
491 | struct list_head *rename_list); | 491 | struct list_head *rename_list); |
492 | int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_scan_info *si); | 492 | int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *si); |
493 | 493 | ||
494 | /* vmt.c */ | 494 | /* vmt.c */ |
495 | int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req); | 495 | int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req); |
@@ -529,14 +529,14 @@ int ubi_eba_atomic_leb_change(struct ubi_device *ubi, struct ubi_volume *vol, | |||
529 | int lnum, const void *buf, int len); | 529 | int lnum, const void *buf, int len); |
530 | int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, | 530 | int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, |
531 | struct ubi_vid_hdr *vid_hdr); | 531 | struct ubi_vid_hdr *vid_hdr); |
532 | int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si); | 532 | int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_attach_info *si); |
533 | 533 | ||
534 | /* wl.c */ | 534 | /* wl.c */ |
535 | int ubi_wl_get_peb(struct ubi_device *ubi); | 535 | int ubi_wl_get_peb(struct ubi_device *ubi); |
536 | int ubi_wl_put_peb(struct ubi_device *ubi, int pnum, int torture); | 536 | int ubi_wl_put_peb(struct ubi_device *ubi, int pnum, int torture); |
537 | int ubi_wl_flush(struct ubi_device *ubi); | 537 | int ubi_wl_flush(struct ubi_device *ubi); |
538 | int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum); | 538 | int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum); |
539 | int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si); | 539 | int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_attach_info *si); |
540 | void ubi_wl_close(struct ubi_device *ubi); | 540 | void ubi_wl_close(struct ubi_device *ubi); |
541 | int ubi_thread(void *u); | 541 | int ubi_thread(void *u); |
542 | 542 | ||
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 379f6203783a..fbe2d7ff6cda 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -298,7 +298,7 @@ bad: | |||
298 | * This function returns zero in case of success and a negative error code in | 298 | * This function returns zero in case of success and a negative error code in |
299 | * case of failure. | 299 | * case of failure. |
300 | */ | 300 | */ |
301 | static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si, | 301 | static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *si, |
302 | int copy, void *vtbl) | 302 | int copy, void *vtbl) |
303 | { | 303 | { |
304 | int err, tries = 0; | 304 | int err, tries = 0; |
@@ -373,7 +373,7 @@ out_free: | |||
373 | * table in case of success and a negative error code in case of failure. | 373 | * table in case of success and a negative error code in case of failure. |
374 | */ | 374 | */ |
375 | static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi, | 375 | static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi, |
376 | struct ubi_scan_info *si, | 376 | struct ubi_attach_info *si, |
377 | struct ubi_ainf_volume *sv) | 377 | struct ubi_ainf_volume *sv) |
378 | { | 378 | { |
379 | int err; | 379 | int err; |
@@ -496,7 +496,7 @@ out_free: | |||
496 | * negative error code in case of failure. | 496 | * negative error code in case of failure. |
497 | */ | 497 | */ |
498 | static struct ubi_vtbl_record *create_empty_lvol(struct ubi_device *ubi, | 498 | static struct ubi_vtbl_record *create_empty_lvol(struct ubi_device *ubi, |
499 | struct ubi_scan_info *si) | 499 | struct ubi_attach_info *si) |
500 | { | 500 | { |
501 | int i; | 501 | int i; |
502 | struct ubi_vtbl_record *vtbl; | 502 | struct ubi_vtbl_record *vtbl; |
@@ -531,7 +531,8 @@ static struct ubi_vtbl_record *create_empty_lvol(struct ubi_device *ubi, | |||
531 | * Returns zero in case of success and a negative error code in case of | 531 | * Returns zero in case of success and a negative error code in case of |
532 | * failure. | 532 | * failure. |
533 | */ | 533 | */ |
534 | static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si, | 534 | static int init_volumes(struct ubi_device *ubi, |
535 | const struct ubi_attach_info *si, | ||
535 | const struct ubi_vtbl_record *vtbl) | 536 | const struct ubi_vtbl_record *vtbl) |
536 | { | 537 | { |
537 | int i, reserved_pebs = 0; | 538 | int i, reserved_pebs = 0; |
@@ -712,7 +713,7 @@ bad: | |||
712 | * information is OK and %-EINVAL if it is not. | 713 | * information is OK and %-EINVAL if it is not. |
713 | */ | 714 | */ |
714 | static int check_scanning_info(const struct ubi_device *ubi, | 715 | static int check_scanning_info(const struct ubi_device *ubi, |
715 | struct ubi_scan_info *si) | 716 | struct ubi_attach_info *si) |
716 | { | 717 | { |
717 | int err, i; | 718 | int err, i; |
718 | struct ubi_ainf_volume *sv; | 719 | struct ubi_ainf_volume *sv; |
@@ -776,7 +777,7 @@ static int check_scanning_info(const struct ubi_device *ubi, | |||
776 | * or creates it if needed. Returns zero in case of success and a negative | 777 | * or creates it if needed. Returns zero in case of success and a negative |
777 | * error code in case of failure. | 778 | * error code in case of failure. |
778 | */ | 779 | */ |
779 | int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_scan_info *si) | 780 | int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *si) |
780 | { | 781 | { |
781 | int i, err; | 782 | int i, err; |
782 | struct ubi_ainf_volume *sv; | 783 | struct ubi_ainf_volume *sv; |
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 53ef24b48211..12a85d5372cd 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -1380,7 +1380,7 @@ static void cancel_pending(struct ubi_device *ubi) | |||
1380 | * This function returns zero in case of success, and a negative error code in | 1380 | * This function returns zero in case of success, and a negative error code in |
1381 | * case of failure. | 1381 | * case of failure. |
1382 | */ | 1382 | */ |
1383 | int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si) | 1383 | int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_attach_info *si) |
1384 | { | 1384 | { |
1385 | int err, i; | 1385 | int err, i; |
1386 | struct rb_node *rb1, *rb2; | 1386 | struct rb_node *rb1, *rb2; |