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

Commit d4906688 authored by Arvind Yadav's avatar Arvind Yadav Committed by Richard Weinberger
Browse files

mtd: constify mtd_partition



mtd_partition are not supposed to change at runtime.
Functions 'mtd_device_parse_register' working with const mtd_partition
provided by <linux/mtd/mtd.h>. So mark the non-const structs as const.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 2e442aeb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ static struct mtd_erase_region_info erase_regions[] = {
	}
};

static struct mtd_partition lart_partitions[] = {
static const struct mtd_partition lart_partitions[] = {
	/* blob */
	{
		.name	= "blob",
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static struct map_info flagadm_map = {
		.bankwidth =	2,
};

static struct mtd_partition flagadm_parts[] = {
static const struct mtd_partition flagadm_parts[] = {
	{
		.name =		"Bootloader",
		.offset	=	FLASH_PARTITION0_ADDR,
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = {
/*
 * MTD partitioning stuff
 */
static struct mtd_partition partitions[] =
static const struct mtd_partition partitions[] =
{
	{
		.name = "FileSystem",
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@
/* partition_info gives details on the logical partitions that the split the
 * single flash device into. If the size if zero we use up to the end of the
 * device. */
static struct mtd_partition partition_info[]={
static const struct mtd_partition partition_info[] = {
    {
	    .name = "NetSc520 boot kernel",
	    .offset = 0,
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ static struct map_info nettel_amd_map = {
	.bankwidth = AMD_BUSWIDTH,
};

static struct mtd_partition nettel_amd_partitions[] = {
static const struct mtd_partition nettel_amd_partitions[] = {
	{
		.name = "SnapGear BIOS config",
		.offset = 0x000e0000,
Loading