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

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
...@@ -583,7 +583,7 @@ static struct mtd_erase_region_info erase_regions[] = { ...@@ -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 */ /* blob */
{ {
.name = "blob", .name = "blob",
......
...@@ -61,7 +61,7 @@ static struct map_info flagadm_map = { ...@@ -61,7 +61,7 @@ static struct map_info flagadm_map = {
.bankwidth = 2, .bankwidth = 2,
}; };
static struct mtd_partition flagadm_parts[] = { static const struct mtd_partition flagadm_parts[] = {
{ {
.name = "Bootloader", .name = "Bootloader",
.offset = FLASH_PARTITION0_ADDR, .offset = FLASH_PARTITION0_ADDR,
......
...@@ -47,7 +47,7 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = { ...@@ -47,7 +47,7 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = {
/* /*
* MTD partitioning stuff * MTD partitioning stuff
*/ */
static struct mtd_partition partitions[] = static const struct mtd_partition partitions[] =
{ {
{ {
.name = "FileSystem", .name = "FileSystem",
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
/* partition_info gives details on the logical partitions that the split the /* 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 * single flash device into. If the size if zero we use up to the end of the
* device. */ * device. */
static struct mtd_partition partition_info[]={ static const struct mtd_partition partition_info[] = {
{ {
.name = "NetSc520 boot kernel", .name = "NetSc520 boot kernel",
.offset = 0, .offset = 0,
......
...@@ -107,7 +107,7 @@ static struct map_info nettel_amd_map = { ...@@ -107,7 +107,7 @@ static struct map_info nettel_amd_map = {
.bankwidth = AMD_BUSWIDTH, .bankwidth = AMD_BUSWIDTH,
}; };
static struct mtd_partition nettel_amd_partitions[] = { static const struct mtd_partition nettel_amd_partitions[] = {
{ {
.name = "SnapGear BIOS config", .name = "SnapGear BIOS config",
.offset = 0x000e0000, .offset = 0x000e0000,
......
...@@ -87,7 +87,7 @@ static DEFINE_SPINLOCK(sbc_gxx_spin); ...@@ -87,7 +87,7 @@ static DEFINE_SPINLOCK(sbc_gxx_spin);
/* partition_info gives details on the logical partitions that the split the /* 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 * single flash device into. If the size if zero we use up to the end of the
* device. */ * device. */
static struct mtd_partition partition_info[]={ static const struct mtd_partition partition_info[] = {
{ .name = "SBC-GXx flash boot partition", { .name = "SBC-GXx flash boot partition",
.offset = 0, .offset = 0,
.size = BOOT_PARTITION_SIZE_KiB*1024 }, .size = BOOT_PARTITION_SIZE_KiB*1024 },
......
...@@ -43,7 +43,7 @@ static struct map_info ts5500_map = { ...@@ -43,7 +43,7 @@ static struct map_info ts5500_map = {
.phys = WINDOW_ADDR .phys = WINDOW_ADDR
}; };
static struct mtd_partition ts5500_partitions[] = { static const struct mtd_partition ts5500_partitions[] = {
{ {
.name = "Drive A", .name = "Drive A",
.offset = 0, .offset = 0,
......
...@@ -49,7 +49,7 @@ static struct mtd_info *uclinux_ram_mtdinfo; ...@@ -49,7 +49,7 @@ static struct mtd_info *uclinux_ram_mtdinfo;
/****************************************************************************/ /****************************************************************************/
static struct mtd_partition uclinux_romfs[] = { static const struct mtd_partition uclinux_romfs[] = {
{ .name = "ROMfs" } { .name = "ROMfs" }
}; };
......
...@@ -41,7 +41,7 @@ static struct mtd_info *ams_delta_mtd = NULL; ...@@ -41,7 +41,7 @@ static struct mtd_info *ams_delta_mtd = NULL;
* Define partitions for flash devices * Define partitions for flash devices
*/ */
static struct mtd_partition partition_info[] = { static const struct mtd_partition partition_info[] = {
{ .name = "Kernel", { .name = "Kernel",
.offset = 0, .offset = 0,
.size = 3 * SZ_1M + SZ_512K }, .size = 3 * SZ_1M + SZ_512K },
......
...@@ -42,7 +42,7 @@ static void __iomem *cmx270_nand_io; ...@@ -42,7 +42,7 @@ static void __iomem *cmx270_nand_io;
/* /*
* Define static partitions for flash device * Define static partitions for flash device
*/ */
static struct mtd_partition partition_info[] = { static const struct mtd_partition partition_info[] = {
[0] = { [0] = {
.name = "cmx270-0", .name = "cmx270-0",
.offset = 0, .offset = 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment