]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ARM: omap1: add const and initconst to omap_lcd_config
authorBhumika Goyal <bhumirks@gmail.com>
Tue, 22 Aug 2017 06:25:50 +0000 (11:55 +0530)
committerTony Lindgren <tony@atomide.com>
Mon, 2 Oct 2017 19:33:15 +0000 (12:33 -0700)
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>
13 files changed:
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap1/board-sx1.c

index 6cbc69c92913dbc4074a65e269bb5243e9193cdb..52e8e53ca154a7146a9abe2b4bf95bf2b2c2be8a 100644 (file)
@@ -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",
 };
 
index b93ad58b0a63fc3f5694d2e7fe76e0240f66e8ca..69bd601feb83d8ff04e1b8f6bbf24bc3fd86b217 100644 (file)
@@ -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",
 };
 
index 6a38c76030644362019375e3195333cd627ef396..ab51f855469798432b6ce0df38532c6327ddf01e 100644 (file)
@@ -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",
 };
 
index 302260583e8ea5d8b50ad9b0ae820679fa422b31..ad339f51cc7858324c5504bc30b94ddbdcd5fe6b 100644 (file)
@@ -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",
 };
 
index e424df901dbd7ee6a914f0b171526a5a8533298a..67d46690a56e470d98c7a22792e856b237809a23 100644 (file)
@@ -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",
 };
 
index 67e1882716434bc8f8a19c036f695f8c44fcc4a0..8c286a29f24b7b39b7b64ef3992ce76ae05aa195 100644 (file)
@@ -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
@@ -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
index 06243c0b12d2fe18a69c874fb1e40a3688e0552a..eb41db78cd47f902013a28eafba249bbb7820042 100644 (file)
@@ -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",
 };
 
index d579f4e04137433a1413f039e2432fd2f4c92b25..c66372ed29e2229d543e17d9961da2f796bd42bb 100644 (file)
@@ -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
index e5288cda1a6acd30f73c9a34e0a43c13ec2958f6..2dc5deb1980308c45a5b4aebcdea97004fc0b713 100644 (file)
@@ -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",
 };
 
index d672495f744168cb759aaf3c622846b517de36f0..a23327682df0f184d1a1a0b7853181170d8bb54a 100644 (file)
@@ -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",
 };
 
index aaf741b0aff61d153b6cb9f6a64fda6b198c4de2..30b07096197b8faf1359a9dd1b27bf03b19106bd 100644 (file)
@@ -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",
 };
 
index e994a78bdd09a92954ef3e0bd3354f497b7d5715..b4951eb8289884549bb67f00e5a17bf8a05cab5e 100644 (file)
@@ -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",
 };
 
index 6c482254b37c4967aa8cc8c5b02f06f864cbdf87..ec27bb3e370ffa48bb1fd2ea1a076fa9847f4767 100644 (file)
@@ -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",
 };