Skip to content

Commit

Permalink
ARM: omap1: add const and initconst to omap_lcd_config
Browse files Browse the repository at this point in the history
Make these const as they are only passed to a const argument of the function
omapfb_set_lcd_config.
Also, replace __initdata with __initconst to avoid section conflict error.
Done using Coccinelle.

@match disable optional_qualifier@
identifier s;
@@
static struct omap_lcd_config s = {...};

@ref@
position p;
identifier match.s;
@@
s@p

@good1@
identifier match.s;
position ref.p;
@@
omapfb_set_lcd_config(&s@p,...)

@bad depends on  !good1@
position ref.p;
identifier match.s;
@@
s@p

@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct omap_lcd_config s;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Bhumika Goyal authored and Tony Lindgren committed Oct 2, 2017
1 parent 2bd6bf0 commit d25c70c
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static struct map_desc ams_delta_io_desc[] __initdata = {
}
};

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

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-fsample.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static struct platform_device *devices[] __initdata = {
&kp_device,
};

static struct omap_lcd_config fsample_lcd_config = {
static const struct omap_lcd_config fsample_lcd_config = {
.ctrl_name = "internal",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-h2.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ static struct omap_usb_config h2_usb_config __initdata = {
.pins[1] = 3,
};

static struct omap_lcd_config h2_lcd_config __initdata = {
static const struct omap_lcd_config h2_lcd_config __initconst = {
.ctrl_name = "internal",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ static struct omap_usb_config h3_usb_config __initdata = {
.pins[1] = 3,
};

static struct omap_lcd_config h3_lcd_config __initdata = {
static const struct omap_lcd_config h3_lcd_config __initconst = {
.ctrl_name = "internal",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-htcherald.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static struct omap_usb_config htcherald_usb_config __initdata = {
};

/* LCD Device resources */
static struct omap_lcd_config htcherald_lcd_config __initdata = {
static const struct omap_lcd_config htcherald_lcd_config __initconst = {
.ctrl_name = "internal",
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap1/board-innovator.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static struct omap_usb_config innovator1510_usb_config __initdata = {
.pins[0] = 2,
};

static struct omap_lcd_config innovator1510_lcd_config __initdata = {
static const struct omap_lcd_config innovator1510_lcd_config __initconst = {
.ctrl_name = "internal",
};
#endif
Expand All @@ -323,7 +323,7 @@ static struct omap_usb_config h2_usb_config __initdata = {
.pins[1] = 3,
};

static struct omap_lcd_config innovator1610_lcd_config __initdata = {
static const struct omap_lcd_config innovator1610_lcd_config __initconst = {
.ctrl_name = "internal",
};
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-nokia770.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static struct mipid_platform_data nokia770_mipid_platform_data = {
.shutdown = mipid_shutdown,
};

static struct omap_lcd_config nokia770_lcd_config __initdata = {
static const struct omap_lcd_config nokia770_lcd_config __initconst = {
.ctrl_name = "hwa742",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-osk.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static struct omap_usb_config osk_usb_config __initdata = {
};

#ifdef CONFIG_OMAP_OSK_MISTRAL
static struct omap_lcd_config osk_lcd_config __initdata = {
static const struct omap_lcd_config osk_lcd_config __initconst = {
.ctrl_name = "internal",
};
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-palmte.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static struct omap_usb_config palmte_usb_config __initdata = {
.pins[0] = 2,
};

static struct omap_lcd_config palmte_lcd_config __initdata = {
static const struct omap_lcd_config palmte_lcd_config __initconst = {
.ctrl_name = "internal",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-palmtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static struct omap_usb_config palmtt_usb_config __initdata = {
.pins[0] = 2,
};

static struct omap_lcd_config palmtt_lcd_config __initdata = {
static const struct omap_lcd_config palmtt_lcd_config __initconst = {
.ctrl_name = "internal",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-palmz71.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static struct omap_usb_config palmz71_usb_config __initdata = {
.pins[0] = 2,
};

static struct omap_lcd_config palmz71_lcd_config __initdata = {
static const struct omap_lcd_config palmz71_lcd_config __initconst = {
.ctrl_name = "internal",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-perseus2.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static struct platform_device *devices[] __initdata = {
&kp_device,
};

static struct omap_lcd_config perseus2_lcd_config __initdata = {
static const struct omap_lcd_config perseus2_lcd_config __initconst = {
.ctrl_name = "internal",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-sx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static struct omap_usb_config sx1_usb_config __initdata = {

/*----------- LCD -------------------------*/

static struct omap_lcd_config sx1_lcd_config __initdata = {
static const struct omap_lcd_config sx1_lcd_config __initconst = {
.ctrl_name = "internal",
};

Expand Down

0 comments on commit d25c70c

Please sign in to comment.