aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 15:35:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 15:35:38 -0700
commit370d2662d569f22ac3d598cd4475617cd910c759 (patch)
tree127b1cd120174be71ce74488694a48df6c87571e /drivers/mtd/ubi/ubi.h
parentd15fee814d8d30bbb4859ef8fef7a1f96327635b (diff)
parentd56030ac25d383218045c5d87e98e0494d6af3ad (diff)
Merge tag 'upstream-3.15-rc1' of git://git.infradead.org/linux-ubifs
Pull ubifs updates from Artem Bityutskiy: "This pull request includes the 'ubiblock' driver which provides R/O block access to UBI volumes. It is useful for those who want to use squashfs on top of raw flash devices. UBI will provide bit-flip handling and wear-levelling in this case (e.g., if there are other UBI volumes with R/W UBIFS too). The driver is actually pretty small and it is part of the UBI kernel subsystem. Delivered by Ezequiel Garcia, along with a piece of documentation on the MTD web site and the user-space tool for creating and removing block devices" * tag 'upstream-3.15-rc1' of git://git.infradead.org/linux-ubifs: UBI: block: Remove __initdata from ubiblock_param_ops UBI: make UBI_IOCVOLCRBLK take a parameter for future usage UBI: rename block device ioctls UBI: block: Use ENOSYS as return value when CONFIG_UBIBLOCK=n UBI: block: Add CONFIG_BLOCK dependency UBI: block: Use 'u64' for the 64-bit dividend UBI: block: Mark init-only symbol as __initdata UBI: block: do not use term "attach" UBI: R/O block driver on top of UBI volumes
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r--drivers/mtd/ubi/ubi.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 8ea6297a208f..0ba8b0a28838 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -864,6 +864,26 @@ int ubi_update_fastmap(struct ubi_device *ubi);
int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai,
int fm_anchor);
+/* block.c */
+#ifdef CONFIG_MTD_UBI_BLOCK
+int ubiblock_init(void);
+void ubiblock_exit(void);
+int ubiblock_create(struct ubi_volume_info *vi);
+int ubiblock_remove(struct ubi_volume_info *vi);
+#else
+static inline int ubiblock_init(void) { return 0; }
+static inline void ubiblock_exit(void) {}
+static inline int ubiblock_create(struct ubi_volume_info *vi)
+{
+ return -ENOSYS;
+}
+static inline int ubiblock_remove(struct ubi_volume_info *vi)
+{
+ return -ENOSYS;
+}
+#endif
+
+
/*
* ubi_rb_for_each_entry - walk an RB-tree.
* @rb: a pointer to type 'struct rb_node' to use as a loop counter