aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLionel Debroux <lionel_debroux@yahoo.fr>2010-11-16 08:14:02 -0500
committerJiri Kosina <jkosina@suse.cz>2010-11-16 08:14:02 -0500
commit2f55ac072f5344519348c0c94b3d2f4cca46847b (patch)
treef3d544ab2812503b12a205b2515111a796638ffb /arch/arm
parentacc2472ed33fc5e72482cc3b3b846077d97c2f8b (diff)
suspend: constify platform_suspend_ops
While at it, fix two checkpatch errors. Several non-const struct instances constified by this patch were added after the introduction of platform_suspend_ops in checkpatch.pl's list of "should be const" structs (79404849e90a41ea2109bd0e2f7c7164b0c4ce73). Patch against mainline. Inspired by hunks of the grsecurity patch, updated for newer kernels. Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-at91/pm.c2
-rw-r--r--arch/arm/mach-davinci/pm.c2
-rw-r--r--arch/arm/mach-imx/pm-imx27.c2
-rw-r--r--arch/arm/mach-lpc32xx/pm.c2
-rw-r--r--arch/arm/mach-omap1/pm.c2
-rw-r--r--arch/arm/mach-omap2/pm24xx.c2
-rw-r--r--arch/arm/mach-omap2/pm34xx.c2
-rw-r--r--arch/arm/mach-omap2/pm44xx.c2
-rw-r--r--arch/arm/mach-pnx4008/pm.c2
-rw-r--r--arch/arm/mach-pxa/pm.c2
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c2
-rw-r--r--arch/arm/mach-sa1100/pm.c2
-rw-r--r--arch/arm/plat-samsung/pm.c2
13 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index dafbacc25eb1..ea53f4d9b283 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -301,7 +301,7 @@ static void at91_pm_end(void)
301} 301}
302 302
303 303
304static struct platform_suspend_ops at91_pm_ops ={ 304static const struct platform_suspend_ops at91_pm_ops = {
305 .valid = at91_pm_valid_state, 305 .valid = at91_pm_valid_state,
306 .begin = at91_pm_begin, 306 .begin = at91_pm_begin,
307 .enter = at91_pm_enter, 307 .enter = at91_pm_enter,
diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c
index fab953b43dea..1bd73a04be20 100644
--- a/arch/arm/mach-davinci/pm.c
+++ b/arch/arm/mach-davinci/pm.c
@@ -110,7 +110,7 @@ static int davinci_pm_enter(suspend_state_t state)
110 return ret; 110 return ret;
111} 111}
112 112
113static struct platform_suspend_ops davinci_pm_ops = { 113static const struct platform_suspend_ops davinci_pm_ops = {
114 .enter = davinci_pm_enter, 114 .enter = davinci_pm_enter,
115 .valid = suspend_valid_only_mem, 115 .valid = suspend_valid_only_mem,
116}; 116};
diff --git a/arch/arm/mach-imx/pm-imx27.c b/arch/arm/mach-imx/pm-imx27.c
index afc17ce0bb54..2153ca71bb82 100644
--- a/arch/arm/mach-imx/pm-imx27.c
+++ b/arch/arm/mach-imx/pm-imx27.c
@@ -32,7 +32,7 @@ static int mx27_suspend_enter(suspend_state_t state)
32 return 0; 32 return 0;
33} 33}
34 34
35static struct platform_suspend_ops mx27_suspend_ops = { 35static const struct platform_suspend_ops mx27_suspend_ops = {
36 .enter = mx27_suspend_enter, 36 .enter = mx27_suspend_enter,
37 .valid = suspend_valid_only_mem, 37 .valid = suspend_valid_only_mem,
38}; 38};
diff --git a/arch/arm/mach-lpc32xx/pm.c b/arch/arm/mach-lpc32xx/pm.c
index a6e2aed9a49f..e76d41bb7056 100644
--- a/arch/arm/mach-lpc32xx/pm.c
+++ b/arch/arm/mach-lpc32xx/pm.c
@@ -123,7 +123,7 @@ static int lpc32xx_pm_enter(suspend_state_t state)
123 return 0; 123 return 0;
124} 124}
125 125
126static struct platform_suspend_ops lpc32xx_pm_ops = { 126static const struct platform_suspend_ops lpc32xx_pm_ops = {
127 .valid = suspend_valid_only_mem, 127 .valid = suspend_valid_only_mem,
128 .enter = lpc32xx_pm_enter, 128 .enter = lpc32xx_pm_enter,
129}; 129};
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index b1d3f9fade23..4cf3b67dd998 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -647,7 +647,7 @@ static struct irqaction omap_wakeup_irq = {
647 647
648 648
649 649
650static struct platform_suspend_ops omap_pm_ops ={ 650static const struct platform_suspend_ops omap_pm_ops = {
651 .prepare = omap_pm_prepare, 651 .prepare = omap_pm_prepare,
652 .enter = omap_pm_enter, 652 .enter = omap_pm_enter,
653 .finish = omap_pm_finish, 653 .finish = omap_pm_finish,
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index a40457d81927..aa9764eeb941 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -326,7 +326,7 @@ static void omap2_pm_finish(void)
326 enable_hlt(); 326 enable_hlt();
327} 327}
328 328
329static struct platform_suspend_ops omap_pm_ops = { 329static const struct platform_suspend_ops omap_pm_ops = {
330 .prepare = omap2_pm_prepare, 330 .prepare = omap2_pm_prepare,
331 .enter = omap2_pm_enter, 331 .enter = omap2_pm_enter,
332 .finish = omap2_pm_finish, 332 .finish = omap2_pm_finish,
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 75c0cd13ad8e..4000c3c8bbd5 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -594,7 +594,7 @@ static void omap3_pm_end(void)
594 return; 594 return;
595} 595}
596 596
597static struct platform_suspend_ops omap_pm_ops = { 597static const struct platform_suspend_ops omap_pm_ops = {
598 .begin = omap3_pm_begin, 598 .begin = omap3_pm_begin,
599 .end = omap3_pm_end, 599 .end = omap3_pm_end,
600 .prepare = omap3_pm_prepare, 600 .prepare = omap3_pm_prepare,
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 54544b4fc76b..dc8b1ef9f84c 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -75,7 +75,7 @@ static void omap4_pm_end(void)
75 return; 75 return;
76} 76}
77 77
78static struct platform_suspend_ops omap_pm_ops = { 78static const struct platform_suspend_ops omap_pm_ops = {
79 .begin = omap4_pm_begin, 79 .begin = omap4_pm_begin,
80 .end = omap4_pm_end, 80 .end = omap4_pm_end,
81 .prepare = omap4_pm_prepare, 81 .prepare = omap4_pm_prepare,
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c
index ee3c29c57ae3..f3e60a049f98 100644
--- a/arch/arm/mach-pnx4008/pm.c
+++ b/arch/arm/mach-pnx4008/pm.c
@@ -119,7 +119,7 @@ static int pnx4008_pm_valid(suspend_state_t state)
119 (state == PM_SUSPEND_MEM); 119 (state == PM_SUSPEND_MEM);
120} 120}
121 121
122static struct platform_suspend_ops pnx4008_pm_ops = { 122static const struct platform_suspend_ops pnx4008_pm_ops = {
123 .enter = pnx4008_pm_enter, 123 .enter = pnx4008_pm_enter,
124 .valid = pnx4008_pm_valid, 124 .valid = pnx4008_pm_valid,
125}; 125};
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 166c15f62916..978e1b289544 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -96,7 +96,7 @@ void pxa_pm_finish(void)
96 pxa_cpu_pm_fns->finish(); 96 pxa_cpu_pm_fns->finish();
97} 97}
98 98
99static struct platform_suspend_ops pxa_pm_ops = { 99static const struct platform_suspend_ops pxa_pm_ops = {
100 .valid = pxa_pm_valid, 100 .valid = pxa_pm_valid,
101 .enter = pxa_pm_enter, 101 .enter = pxa_pm_enter,
102 .prepare = pxa_pm_prepare, 102 .prepare = pxa_pm_prepare,
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index 8fed027b12dc..02874e96ec72 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -868,7 +868,7 @@ static void sharpsl_apm_get_power_status(struct apm_power_info *info)
868} 868}
869 869
870#ifdef CONFIG_PM 870#ifdef CONFIG_PM
871static struct platform_suspend_ops sharpsl_pm_ops = { 871static const struct platform_suspend_ops sharpsl_pm_ops = {
872 .prepare = pxa_pm_prepare, 872 .prepare = pxa_pm_prepare,
873 .finish = pxa_pm_finish, 873 .finish = pxa_pm_finish,
874 .enter = corgi_pxa_pm_enter, 874 .enter = corgi_pxa_pm_enter,
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
index c83fdc80edfd..ab9fc4470d36 100644
--- a/arch/arm/mach-sa1100/pm.c
+++ b/arch/arm/mach-sa1100/pm.c
@@ -120,7 +120,7 @@ unsigned long sleep_phys_sp(void *sp)
120 return virt_to_phys(sp); 120 return virt_to_phys(sp);
121} 121}
122 122
123static struct platform_suspend_ops sa11x0_pm_ops = { 123static const struct platform_suspend_ops sa11x0_pm_ops = {
124 .enter = sa11x0_pm_enter, 124 .enter = sa11x0_pm_enter,
125 .valid = suspend_valid_only_mem, 125 .valid = suspend_valid_only_mem,
126}; 126};
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index 27cfca597699..5bf3f2f09e74 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -355,7 +355,7 @@ static void s3c_pm_finish(void)
355 s3c_pm_check_cleanup(); 355 s3c_pm_check_cleanup();
356} 356}
357 357
358static struct platform_suspend_ops s3c_pm_ops = { 358static const struct platform_suspend_ops s3c_pm_ops = {
359 .enter = s3c_pm_enter, 359 .enter = s3c_pm_enter,
360 .prepare = s3c_pm_prepare, 360 .prepare = s3c_pm_prepare,
361 .finish = s3c_pm_finish, 361 .finish = s3c_pm_finish,