aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r--drivers/mtd/ubi/ubi.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 21c028366fd2..91fde0e8ff58 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -245,6 +245,7 @@ struct ubi_wl_entry;
245 * @beb_rsvd_level, @bad_peb_count, @good_peb_count, @vol_count, 245 * @beb_rsvd_level, @bad_peb_count, @good_peb_count, @vol_count,
246 * @vol->readers, @vol->writers, @vol->exclusive, 246 * @vol->readers, @vol->writers, @vol->exclusive,
247 * @vol->ref_count, @vol->mapping and @vol->eba_tbl. 247 * @vol->ref_count, @vol->mapping and @vol->eba_tbl.
248 * @ref_count: count of references on the UBI device
248 * 249 *
249 * @rsvd_pebs: count of reserved physical eraseblocks 250 * @rsvd_pebs: count of reserved physical eraseblocks
250 * @avail_pebs: count of available physical eraseblocks 251 * @avail_pebs: count of available physical eraseblocks
@@ -325,6 +326,7 @@ struct ubi_device {
325 int vol_count; 326 int vol_count;
326 struct ubi_volume *volumes[UBI_MAX_VOLUMES+UBI_INT_VOL_COUNT]; 327 struct ubi_volume *volumes[UBI_MAX_VOLUMES+UBI_INT_VOL_COUNT];
327 spinlock_t volumes_lock; 328 spinlock_t volumes_lock;
329 int ref_count;
328 330
329 int rsvd_pebs; 331 int rsvd_pebs;
330 int avail_pebs; 332 int avail_pebs;
@@ -401,7 +403,6 @@ extern struct kmem_cache *ubi_wl_entry_slab;
401extern struct file_operations ubi_ctrl_cdev_operations; 403extern struct file_operations ubi_ctrl_cdev_operations;
402extern struct file_operations ubi_cdev_operations; 404extern struct file_operations ubi_cdev_operations;
403extern struct file_operations ubi_vol_cdev_operations; 405extern struct file_operations ubi_vol_cdev_operations;
404extern struct ubi_device *ubi_devices[];
405extern struct class *ubi_class; 406extern struct class *ubi_class;
406 407
407/* vtbl.c */ 408/* vtbl.c */
@@ -479,6 +480,12 @@ int ubi_io_read_vid_hdr(struct ubi_device *ubi, int pnum,
479int ubi_io_write_vid_hdr(struct ubi_device *ubi, int pnum, 480int ubi_io_write_vid_hdr(struct ubi_device *ubi, int pnum,
480 struct ubi_vid_hdr *vid_hdr); 481 struct ubi_vid_hdr *vid_hdr);
481 482
483/* build.c */
484struct ubi_device *ubi_get_device(int ubi_num);
485void ubi_put_device(struct ubi_device *ubi);
486struct ubi_device *ubi_get_by_major(int major);
487int ubi_major2num(int major);
488
482/* 489/*
483 * ubi_rb_for_each_entry - walk an RB-tree. 490 * ubi_rb_for_each_entry - walk an RB-tree.
484 * @rb: a pointer to type 'struct rb_node' to to use as a loop counter 491 * @rb: a pointer to type 'struct rb_node' to to use as a loop counter