Skip to content

Commit

Permalink
ARM: OMAP1: ams-delta: clean up init data section assignments
Browse files Browse the repository at this point in the history
The main purpose of this patch is to fix several section mismatch
warnings from the board file and a few board specific drivers,
introduced with recent Amstrad Delta patch series, some of them rising
up only when building with CONFIG_MODULES not set.

While being at it, section tagging of all init data found in the board
file have been revised and hopefully corrected and/or optimized.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Janusz Krzysztofik authored and Tony Lindgren committed Mar 1, 2012
1 parent dc0caef commit da564a0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions arch/arm/mach-omap1/board-ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static struct map_desc ams_delta_io_desc[] __initdata = {
}
};

static struct omap_lcd_config ams_delta_lcd_config = {
static struct omap_lcd_config ams_delta_lcd_config __initdata = {
.ctrl_name = "internal",
};

Expand All @@ -167,7 +167,7 @@ static struct omap_board_config_kernel ams_delta_config[] __initdata = {
#define LATCH1_GPIO_BASE 232
#define LATCH1_NGPIO 8

static struct resource latch1_resources[] __initconst = {
static struct resource latch1_resources[] = {
[0] = {
.name = "dat",
.start = LATCH1_PHYS,
Expand All @@ -176,7 +176,7 @@ static struct resource latch1_resources[] __initconst = {
},
};

static struct bgpio_pdata latch1_pdata __initconst = {
static struct bgpio_pdata latch1_pdata = {
.base = LATCH1_GPIO_BASE,
.ngpio = LATCH1_NGPIO,
};
Expand All @@ -191,7 +191,7 @@ static struct platform_device latch1_gpio_device = {
},
};

static struct resource latch2_resources[] __initconst = {
static struct resource latch2_resources[] = {
[0] = {
.name = "dat",
.start = LATCH2_PHYS,
Expand All @@ -200,7 +200,7 @@ static struct resource latch2_resources[] __initconst = {
},
};

static struct bgpio_pdata latch2_pdata __initconst = {
static struct bgpio_pdata latch2_pdata = {
.base = AMS_DELTA_LATCH2_GPIO_BASE,
.ngpio = AMS_DELTA_LATCH2_NGPIO,
};
Expand All @@ -215,7 +215,7 @@ static struct platform_device latch2_gpio_device = {
},
};

static struct gpio latch_gpios[] __initconst = {
static const struct gpio latch_gpios[] __initconst = {
{
.gpio = LATCH1_GPIO_BASE + 6,
.flags = GPIOF_OUT_INIT_LOW,
Expand Down Expand Up @@ -322,7 +322,7 @@ static struct platform_device ams_delta_lcd_device = {
.id = -1,
};

static struct gpio_led gpio_leds[] __initconst = {
static const struct gpio_led gpio_leds[] __initconst = {
{
.name = "camera",
.gpio = LATCH1_GPIO_BASE + 0,
Expand Down Expand Up @@ -358,7 +358,7 @@ static struct gpio_led gpio_leds[] __initconst = {
},
};

static struct gpio_led_platform_data leds_pdata __initconst = {
static const struct gpio_led_platform_data leds_pdata __initconst = {
.leds = gpio_leds,
.num_leds = ARRAY_SIZE(gpio_leds),
};
Expand Down Expand Up @@ -415,7 +415,7 @@ static struct platform_device *ams_delta_devices[] __initdata = {
&ams_delta_camera_device,
};

static struct platform_device *late_devices[] __initconst = {
static struct platform_device *late_devices[] __initdata = {
&ams_delta_nand_device,
&ams_delta_lcd_device,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/serio/ams_delta_serio.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void ams_delta_serio_close(struct serio *serio)
gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 0);
}

static struct gpio ams_delta_gpios[] __initconst_or_module = {
static const struct gpio ams_delta_gpios[] __initconst_or_module = {
{
.gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATA,
.flags = GPIOF_DIR_IN,
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/nand/ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int ams_delta_nand_ready(struct mtd_info *mtd)
return gpio_get_value(AMS_DELTA_GPIO_PIN_NAND_RB);
}

static struct gpio _mandatory_gpio[] __initconst_or_module = {
static const struct gpio _mandatory_gpio[] = {
{
.gpio = AMS_DELTA_GPIO_PIN_NAND_NCE,
.flags = GPIOF_OUT_INIT_HIGH,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/omap/lcd_ams_delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static struct lcd_ops ams_delta_lcd_ops = {

/* omapfb panel section */

static struct gpio _gpios[] __initconst_or_module = {
static const struct gpio _gpios[] = {
{
.gpio = AMS_DELTA_GPIO_PIN_LCD_VBLEN,
.flags = GPIOF_OUT_INIT_LOW,
Expand Down

0 comments on commit da564a0

Please sign in to comment.