Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88c3522c authored by Sahitya Tummala's avatar Sahitya Tummala
Browse files

Revert "mtd: make mtd_partition.name const"



This reverts 'commit 26a6d240 ("mtd: make
mtd_partition.name const")'. This is needed to fix the
compilation issue with msm_qpic_nand driver which makes
changes to mtd partition name.

Change-Id: Ic10df9c29d08d3df5df351f33e84a2c8e5158b43
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent c15eb76b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -617,7 +617,7 @@ static int mtd_add_partition_attrs(struct mtd_part *new)
	return ret;
}

int mtd_add_partition(struct mtd_info *master, const char *name,
int mtd_add_partition(struct mtd_info *master, char *name,
		      long long offset, long long length)
{
	struct mtd_partition part;
+2 −2
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ static int parse_ofpart_partitions(struct mtd_info *master,
		partname = of_get_property(pp, "label", &len);
		if (!partname)
			partname = of_get_property(pp, "name", &len);
		parts[i].name = partname;
		parts[i].name = (char *)partname;

		if (of_get_property(pp, "read-only", &len))
			parts[i].mask_flags |= MTD_WRITEABLE;
@@ -186,7 +186,7 @@ static int parse_ofoldpart_partitions(struct mtd_info *master,
		if (names && (plen > 0)) {
			int len = strlen(names) + 1;

			parts[i].name = names;
			parts[i].name = (char *)names;
			plen -= len;
			names += len;
		} else {
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
 */

struct mtd_partition {
	const char *name;		/* identifier string */
	char *name;			/* identifier string */
	uint64_t size;			/* partition size */
	uint64_t offset;		/* offset within the master MTD space */
	uint32_t mask_flags;		/* master MTD flags to mask out for this partition */
@@ -97,7 +97,7 @@ extern void deregister_mtd_parser(struct mtd_part_parser *parser);
		      deregister_mtd_parser)

int mtd_is_partition(const struct mtd_info *mtd);
int mtd_add_partition(struct mtd_info *master, const char *name,
int mtd_add_partition(struct mtd_info *master, char *name,
		      long long offset, long long length);
int mtd_del_partition(struct mtd_info *master, int partno);
uint64_t mtd_get_device_size(const struct mtd_info *mtd);