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

Commit d25c70cf authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Tony Lindgren
Browse files

ARM: omap1: add const and initconst to omap_lcd_config



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: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 2bd6bf03
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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",
};

+1 −1
Original line number Diff line number Diff line
@@ -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",
};

+1 −1
Original line number Diff line number Diff line
@@ -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",
};

+1 −1
Original line number Diff line number Diff line
@@ -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",
};

+1 −1
Original line number Diff line number Diff line
@@ -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",
};

Loading