diff options
| author | Bhumika Goyal <bhumirks@gmail.com> | 2017-08-22 02:25:50 -0400 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2017-10-02 15:33:15 -0400 |
| commit | d25c70cfebaea59a6c8c4966e9a75f5c750131bd (patch) | |
| tree | 5b2d493c3df078aabab18ccec35d2546e783d054 | |
| parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) | |
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: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
| -rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-fsample.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-htcherald.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-palmtt.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-palmz71.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-perseus2.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/board-sx1.c | 2 |
13 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 6cbc69c92913..52e8e53ca154 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
| @@ -156,7 +156,7 @@ static struct map_desc ams_delta_io_desc[] __initdata = { | |||
| 156 | } | 156 | } |
| 157 | }; | 157 | }; |
| 158 | 158 | ||
| 159 | static struct omap_lcd_config ams_delta_lcd_config __initdata = { | 159 | static const struct omap_lcd_config ams_delta_lcd_config __initconst = { |
| 160 | .ctrl_name = "internal", | 160 | .ctrl_name = "internal", |
| 161 | }; | 161 | }; |
| 162 | 162 | ||
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index b93ad58b0a63..69bd601feb83 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
| @@ -266,7 +266,7 @@ static struct platform_device *devices[] __initdata = { | |||
| 266 | &kp_device, | 266 | &kp_device, |
| 267 | }; | 267 | }; |
| 268 | 268 | ||
| 269 | static struct omap_lcd_config fsample_lcd_config = { | 269 | static const struct omap_lcd_config fsample_lcd_config = { |
| 270 | .ctrl_name = "internal", | 270 | .ctrl_name = "internal", |
| 271 | }; | 271 | }; |
| 272 | 272 | ||
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 6a38c7603064..ab51f8554697 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
| @@ -357,7 +357,7 @@ static struct omap_usb_config h2_usb_config __initdata = { | |||
| 357 | .pins[1] = 3, | 357 | .pins[1] = 3, |
| 358 | }; | 358 | }; |
| 359 | 359 | ||
| 360 | static struct omap_lcd_config h2_lcd_config __initdata = { | 360 | static const struct omap_lcd_config h2_lcd_config __initconst = { |
| 361 | .ctrl_name = "internal", | 361 | .ctrl_name = "internal", |
| 362 | }; | 362 | }; |
| 363 | 363 | ||
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 302260583e8e..ad339f51cc78 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
| @@ -376,7 +376,7 @@ static struct omap_usb_config h3_usb_config __initdata = { | |||
| 376 | .pins[1] = 3, | 376 | .pins[1] = 3, |
| 377 | }; | 377 | }; |
| 378 | 378 | ||
| 379 | static struct omap_lcd_config h3_lcd_config __initdata = { | 379 | static const struct omap_lcd_config h3_lcd_config __initconst = { |
| 380 | .ctrl_name = "internal", | 380 | .ctrl_name = "internal", |
| 381 | }; | 381 | }; |
| 382 | 382 | ||
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index e424df901dbd..67d46690a56e 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
| @@ -391,7 +391,7 @@ static struct omap_usb_config htcherald_usb_config __initdata = { | |||
| 391 | }; | 391 | }; |
| 392 | 392 | ||
| 393 | /* LCD Device resources */ | 393 | /* LCD Device resources */ |
| 394 | static struct omap_lcd_config htcherald_lcd_config __initdata = { | 394 | static const struct omap_lcd_config htcherald_lcd_config __initconst = { |
| 395 | .ctrl_name = "internal", | 395 | .ctrl_name = "internal", |
| 396 | }; | 396 | }; |
| 397 | 397 | ||
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 67e188271643..8c286a29f24b 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
| @@ -302,7 +302,7 @@ static struct omap_usb_config innovator1510_usb_config __initdata = { | |||
| 302 | .pins[0] = 2, | 302 | .pins[0] = 2, |
| 303 | }; | 303 | }; |
| 304 | 304 | ||
| 305 | static struct omap_lcd_config innovator1510_lcd_config __initdata = { | 305 | static const struct omap_lcd_config innovator1510_lcd_config __initconst = { |
| 306 | .ctrl_name = "internal", | 306 | .ctrl_name = "internal", |
| 307 | }; | 307 | }; |
| 308 | #endif | 308 | #endif |
| @@ -323,7 +323,7 @@ static struct omap_usb_config h2_usb_config __initdata = { | |||
| 323 | .pins[1] = 3, | 323 | .pins[1] = 3, |
| 324 | }; | 324 | }; |
| 325 | 325 | ||
| 326 | static struct omap_lcd_config innovator1610_lcd_config __initdata = { | 326 | static const struct omap_lcd_config innovator1610_lcd_config __initconst = { |
| 327 | .ctrl_name = "internal", | 327 | .ctrl_name = "internal", |
| 328 | }; | 328 | }; |
| 329 | #endif | 329 | #endif |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 06243c0b12d2..eb41db78cd47 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
| @@ -103,7 +103,7 @@ static struct mipid_platform_data nokia770_mipid_platform_data = { | |||
| 103 | .shutdown = mipid_shutdown, | 103 | .shutdown = mipid_shutdown, |
| 104 | }; | 104 | }; |
| 105 | 105 | ||
| 106 | static struct omap_lcd_config nokia770_lcd_config __initdata = { | 106 | static const struct omap_lcd_config nokia770_lcd_config __initconst = { |
| 107 | .ctrl_name = "hwa742", | 107 | .ctrl_name = "hwa742", |
| 108 | }; | 108 | }; |
| 109 | 109 | ||
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index d579f4e04137..c66372ed29e2 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
| @@ -295,7 +295,7 @@ static struct omap_usb_config osk_usb_config __initdata = { | |||
| 295 | }; | 295 | }; |
| 296 | 296 | ||
| 297 | #ifdef CONFIG_OMAP_OSK_MISTRAL | 297 | #ifdef CONFIG_OMAP_OSK_MISTRAL |
| 298 | static struct omap_lcd_config osk_lcd_config __initdata = { | 298 | static const struct omap_lcd_config osk_lcd_config __initconst = { |
| 299 | .ctrl_name = "internal", | 299 | .ctrl_name = "internal", |
| 300 | }; | 300 | }; |
| 301 | #endif | 301 | #endif |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index e5288cda1a6a..2dc5deb19803 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
| @@ -178,7 +178,7 @@ static struct omap_usb_config palmte_usb_config __initdata = { | |||
| 178 | .pins[0] = 2, | 178 | .pins[0] = 2, |
| 179 | }; | 179 | }; |
| 180 | 180 | ||
| 181 | static struct omap_lcd_config palmte_lcd_config __initdata = { | 181 | static const struct omap_lcd_config palmte_lcd_config __initconst = { |
| 182 | .ctrl_name = "internal", | 182 | .ctrl_name = "internal", |
| 183 | }; | 183 | }; |
| 184 | 184 | ||
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index d672495f7441..a23327682df0 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
| @@ -241,7 +241,7 @@ static struct omap_usb_config palmtt_usb_config __initdata = { | |||
| 241 | .pins[0] = 2, | 241 | .pins[0] = 2, |
| 242 | }; | 242 | }; |
| 243 | 243 | ||
| 244 | static struct omap_lcd_config palmtt_lcd_config __initdata = { | 244 | static const struct omap_lcd_config palmtt_lcd_config __initconst = { |
| 245 | .ctrl_name = "internal", | 245 | .ctrl_name = "internal", |
| 246 | }; | 246 | }; |
| 247 | 247 | ||
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index aaf741b0aff6..30b07096197b 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
| @@ -206,7 +206,7 @@ static struct omap_usb_config palmz71_usb_config __initdata = { | |||
| 206 | .pins[0] = 2, | 206 | .pins[0] = 2, |
| 207 | }; | 207 | }; |
| 208 | 208 | ||
| 209 | static struct omap_lcd_config palmz71_lcd_config __initdata = { | 209 | static const struct omap_lcd_config palmz71_lcd_config __initconst = { |
| 210 | .ctrl_name = "internal", | 210 | .ctrl_name = "internal", |
| 211 | }; | 211 | }; |
| 212 | 212 | ||
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index e994a78bdd09..b4951eb82898 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
| @@ -225,7 +225,7 @@ static struct platform_device *devices[] __initdata = { | |||
| 225 | &kp_device, | 225 | &kp_device, |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | static struct omap_lcd_config perseus2_lcd_config __initdata = { | 228 | static const struct omap_lcd_config perseus2_lcd_config __initconst = { |
| 229 | .ctrl_name = "internal", | 229 | .ctrl_name = "internal", |
| 230 | }; | 230 | }; |
| 231 | 231 | ||
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 6c482254b37c..ec27bb3e370f 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
| @@ -297,7 +297,7 @@ static struct omap_usb_config sx1_usb_config __initdata = { | |||
| 297 | 297 | ||
| 298 | /*----------- LCD -------------------------*/ | 298 | /*----------- LCD -------------------------*/ |
| 299 | 299 | ||
| 300 | static struct omap_lcd_config sx1_lcd_config __initdata = { | 300 | static const struct omap_lcd_config sx1_lcd_config __initconst = { |
| 301 | .ctrl_name = "internal", | 301 | .ctrl_name = "internal", |
| 302 | }; | 302 | }; |
| 303 | 303 | ||
