diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-16 13:00:38 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-26 12:15:15 -0500 |
commit | 89b96b69290668351a33b09372ec1c94cb5748e5 (patch) | |
tree | cdbb79da1c821f2155815119ded20d181c23c7c2 /drivers/mtd/ubi/ubi.h | |
parent | 77c722dde9975361051c5530475f8f92ed67a506 (diff) |
UBI: improve internal interfaces
Pass volume description object to the EBA function which makes
more sense, and EBA function do not have to find the volume
description object by volume ID.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 23875bf6aa3b..0a3a803dd22f 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -410,8 +410,8 @@ int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_scan_info *si); | |||
410 | int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req); | 410 | int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req); |
411 | int ubi_remove_volume(struct ubi_volume_desc *desc); | 411 | int ubi_remove_volume(struct ubi_volume_desc *desc); |
412 | int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs); | 412 | int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs); |
413 | int ubi_add_volume(struct ubi_device *ubi, int vol_id); | 413 | int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol); |
414 | void ubi_free_volume(struct ubi_device *ubi, int vol_id); | 414 | void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol); |
415 | 415 | ||
416 | /* upd.c */ | 416 | /* upd.c */ |
417 | int ubi_start_update(struct ubi_device *ubi, int vol_id, long long bytes); | 417 | int ubi_start_update(struct ubi_device *ubi, int vol_id, long long bytes); |
@@ -435,16 +435,17 @@ void ubi_gluebi_updated(struct ubi_volume *vol); | |||
435 | #endif | 435 | #endif |
436 | 436 | ||
437 | /* eba.c */ | 437 | /* eba.c */ |
438 | int ubi_eba_unmap_leb(struct ubi_device *ubi, int vol_id, int lnum); | 438 | int ubi_eba_unmap_leb(struct ubi_device *ubi, struct ubi_volume *vol, |
439 | int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf, | 439 | int lnum); |
440 | int offset, int len, int check); | 440 | int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum, |
441 | int ubi_eba_write_leb(struct ubi_device *ubi, int vol_id, int lnum, | 441 | void *buf, int offset, int len, int check); |
442 | int ubi_eba_write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum, | ||
442 | const void *buf, int offset, int len, int dtype); | 443 | const void *buf, int offset, int len, int dtype); |
443 | int ubi_eba_write_leb_st(struct ubi_device *ubi, int vol_id, int lnum, | 444 | int ubi_eba_write_leb_st(struct ubi_device *ubi, struct ubi_volume *vol, |
444 | const void *buf, int len, int dtype, | 445 | int lnum, const void *buf, int len, int dtype, |
445 | int used_ebs); | 446 | int used_ebs); |
446 | int ubi_eba_atomic_leb_change(struct ubi_device *ubi, int vol_id, int lnum, | 447 | int ubi_eba_atomic_leb_change(struct ubi_device *ubi, struct ubi_volume *vol, |
447 | const void *buf, int len, int dtype); | 448 | int lnum, const void *buf, int len, int dtype); |
448 | int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, | 449 | int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, |
449 | struct ubi_vid_hdr *vid_hdr); | 450 | struct ubi_vid_hdr *vid_hdr); |
450 | int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si); | 451 | int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si); |