summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-01-14 09:33:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-02-13 19:39:08 +0100
commit29ea8bcd94c7802f88dcb69a4bef29aa9283cc69 (patch)
tree93b8b0f3c30db21fdb8597e64c71ac49b8187ce2 /include
parent403fbbbc3411a3dccc80f0c0798b0c2c9924eda9 (diff)
downloadbarebox-29ea8bcd94c7802f88dcb69a4bef29aa9283cc69.tar.gz
barebox-29ea8bcd94c7802f88dcb69a4bef29aa9283cc69.tar.xz
mtd: Simplify partitions
Embed the partition information in struct mtd_info. This makes the mtd partition code simpler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/mtd.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 402e4978b1..e02204a503 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -217,6 +217,9 @@ struct mtd_info {
/* If true erasing bad blocks is allowed, this is set via a device parameter */
bool allow_erasebad;
int p_allow_erasebad;
+
+ struct mtd_info *master;
+ uint32_t master_offset;
};
int mtd_erase(struct mtd_info *mtd, struct erase_info *instr);
@@ -272,7 +275,7 @@ struct mtd_notifier {
struct mtd_info *mtd_add_partition(struct mtd_info *mtd, off_t offset, size_t size,
unsigned long flags, const char *name);
-void mtd_del_partition(struct mtd_info *mtd);
+int mtd_del_partition(struct mtd_info *mtd);
extern void register_mtd_user (struct mtd_notifier *new);
extern int unregister_mtd_user (struct mtd_notifier *old);