aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-16 13:00:38 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-26 12:15:15 -0500
commit89b96b69290668351a33b09372ec1c94cb5748e5 (patch)
treecdbb79da1c821f2155815119ded20d181c23c7c2 /drivers/mtd/ubi/ubi.h
parent77c722dde9975361051c5530475f8f92ed67a506 (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.h21
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);
410int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req); 410int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req);
411int ubi_remove_volume(struct ubi_volume_desc *desc); 411int ubi_remove_volume(struct ubi_volume_desc *desc);
412int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs); 412int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs);
413int ubi_add_volume(struct ubi_device *ubi, int vol_id); 413int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol);
414void ubi_free_volume(struct ubi_device *ubi, int vol_id); 414void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol);
415 415
416/* upd.c */ 416/* upd.c */
417int ubi_start_update(struct ubi_device *ubi, int vol_id, long long bytes); 417int 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 */
438int ubi_eba_unmap_leb(struct ubi_device *ubi, int vol_id, int lnum); 438int ubi_eba_unmap_leb(struct ubi_device *ubi, struct ubi_volume *vol,
439int 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); 440int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
441int ubi_eba_write_leb(struct ubi_device *ubi, int vol_id, int lnum, 441 void *buf, int offset, int len, int check);
442int 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);
443int ubi_eba_write_leb_st(struct ubi_device *ubi, int vol_id, int lnum, 444int 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);
446int ubi_eba_atomic_leb_change(struct ubi_device *ubi, int vol_id, int lnum, 447int 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);
448int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, 449int 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);
450int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si); 451int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si);