ARM: LPC32xx: Fixed structures improperly tagged with __init
authorKevin Wells <wellsk40@gmail.com>
Mon, 10 Jan 2011 22:14:21 +0000 (14:14 -0800)
committerKevin Wells <wellsk40@gmail.com>
Mon, 10 Jan 2011 22:14:21 +0000 (14:14 -0800)
Several platform structure related to NAND were improperly tagged
with the __init flag and were cleared after init. When modules or
functions that examined the platform data list were used, the system
would crash. This patch fixes that.

arch/arm/mach-lpc32xx/ea3250.c
arch/arm/mach-lpc32xx/fdi3250.c
arch/arm/mach-lpc32xx/phy3250.c

index 00ecc9c..2256ab4 100644 (file)
@@ -622,7 +622,7 @@ static int nandwp_enable(int enable)
         return 1;
 }
 #define BLK_SIZE (2048 * 64)
-static struct mtd_partition __initdata ea3250_nand_partition[] = {
+static struct mtd_partition ea3250_nand_partition[] = {
         {
                 .name   = "ea3250-boot",
                 .offset = 0,
@@ -645,12 +645,12 @@ static struct mtd_partition __initdata ea3250_nand_partition[] = {
                 .size   = MTDPART_SIZ_FULL
         },
 };
-static struct mtd_partition * __init ea3250_nand_partitions(int size, int *num_partitions)
+static struct mtd_partition * ea3250_nand_partitions(int size, int *num_partitions)
 {
         *num_partitions = ARRAY_SIZE(ea3250_nand_partition);
         return ea3250_nand_partition;
 }
-struct lpc32XX_nand_cfg __initdata lpc32xx_nandcfg =
+struct lpc32XX_nand_cfg lpc32xx_nandcfg =
 {
         .wdr_clks               = 14,
         .wwidth                 = 260000000,
@@ -684,7 +684,7 @@ static struct resource slc_nand_resources[] = {
 };
 
 static u64 lpc32xx_slc_dma_mask = 0xffffffffUL;
-static struct platform_device __initdata lpc32xx_slc_nand_device = {
+static struct platform_device lpc32xx_slc_nand_device = {
         .name           = "lpc32xx-nand",
         .id             = 0,
         .dev            = {
index dd82779..94000f9 100644 (file)
@@ -325,7 +325,7 @@ static int nandwp_enable(int enable)
         return 1;
 }
 #define BLK_SIZE (2048 * 64)
-static struct mtd_partition __initdata fdi3250_nand_partition[] = {
+static struct mtd_partition fdi3250_nand_partition[] = {
         {
                 .name   = "fdi3250-boot",
                 .offset = 0,
@@ -347,7 +347,7 @@ static struct mtd_partition __initdata fdi3250_nand_partition[] = {
                 .size   = MTDPART_SIZ_FULL
         },
 };
-static struct mtd_partition * __init fdi3250_nand_partitions(int size, int *num_partitions)
+static struct mtd_partition * fdi3250_nand_partitions(int size, int *num_partitions)
 {
         *num_partitions = ARRAY_SIZE(fdi3250_nand_partition);
         return fdi3250_nand_partition;
index 3c50131..7bdfcf4 100644 (file)
@@ -394,7 +394,7 @@ static int nandwp_enable(int enable)
         return 1;
 }
 #define BLK_SIZE (512 * 32)
-static struct mtd_partition __initdata phy3250_nand_partition[] = {
+static struct mtd_partition phy3250_nand_partition[] = {
         {
                 .name   = "phy3250-boot",
                 .offset = 0,
@@ -421,12 +421,12 @@ static struct mtd_partition __initdata phy3250_nand_partition[] = {
                 .size   = MTDPART_SIZ_FULL
         },
 };
-static struct mtd_partition * __init phy3250_nand_partitions(int size, int *num_partitions)
+static struct mtd_partition * phy3250_nand_partitions(int size, int *num_partitions)
 {
         *num_partitions = ARRAY_SIZE(phy3250_nand_partition);
         return phy3250_nand_partition;
 }
-struct lpc32XX_nand_cfg __initdata lpc32xx_nandcfg =
+struct lpc32XX_nand_cfg lpc32xx_nandcfg =
 {
         .wdr_clks               = 3,
         .wwidth                 = 28571428,
@@ -459,7 +459,7 @@ static struct resource slc_nand_resources[] = {
 
 };
 static u64 lpc32xx_slc_dma_mask = 0xffffffffUL;
-static struct platform_device __initdata lpc32xx_slc_nand_device = {
+static struct platform_device lpc32xx_slc_nand_device = {
         .name           = "lpc32xx-nand",
         .id             = 0,
         .dev            = {