diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-20 10:12:14 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-23 15:16:56 +0200 |
commit | 742bd919194e84f14efa4f8dcfb0e31b23c436c3 (patch) | |
tree | d2d7bc712c8d7c46e4ccd9900c9f5e295be56738 /drivers/mtd/core.c | |
parent | a385f657e941c90f0d9f5e46a46f9f53a952dfb1 (diff) | |
download | barebox-742bd919194e84f14efa4f8dcfb0e31b23c436c3.tar.gz barebox-742bd919194e84f14efa4f8dcfb0e31b23c436c3.tar.xz |
mtd: of: put master offset into partition name
Partition names should be partition@<offset> with <offset> being the
offset in the master mtd, and not a counting number.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/core.c')
-rw-r--r-- | drivers/mtd/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c index 3bdf441ad2..d873369d5d 100644 --- a/drivers/mtd/core.c +++ b/drivers/mtd/core.c @@ -491,7 +491,7 @@ static int of_mtd_fixup(struct device_node *root, void *ctx) { struct mtd_info *mtd = ctx, *partmtd; struct device_node *np, *part, *tmp; - int ret, i = 0; + int ret; np = of_find_node_by_path_from(root, mtd->of_path); if (!np) { @@ -508,7 +508,7 @@ static int of_mtd_fixup(struct device_node *root, void *ctx) list_for_each_entry(partmtd, &mtd->partitions, partitions_entry) { int na, ns, len = 0; - char *name = asprintf("partition@%d", i++); + char *name = asprintf("partition@%0llx", partmtd->master_offset); void *p; u8 tmp[16 * 16]; /* Up to 64-bit address + 64-bit size */ |