diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-01-29 09:06:30 -0500 |
---|---|---|
committer | Robert Jarzmik <robert.jarzmik@free.fr> | 2016-02-01 15:44:27 -0500 |
commit | a9a54caed96561d01f1d923df61bd11b71df4b93 (patch) | |
tree | 5c04a0bec4a25a704bcb171bd3e91fc2feffba85 | |
parent | 2f2028615924b953d9b00a06119c14c3dac9247e (diff) |
ARM: pxa: move extern declarations to pm.h
When CONFIG_IWMMXT is disabled, we get a warning in pxa3xx.c:
arch/arm/mach-pxa/pxa3xx.c: In function 'pxa3xx_cpu_pm_suspend':
arch/arm/mach-pxa/pxa3xx.c:109:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
It turns out that there is an 'extern' declaration in the
middle of a function.
For consistency, this moves the declaration and two others from
the same file into pm.h.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
-rw-r--r-- | arch/arm/mach-pxa/pm.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/pm.h b/arch/arm/mach-pxa/pm.h index 51558bcee999..3aab90d8d2b7 100644 --- a/arch/arm/mach-pxa/pm.h +++ b/arch/arm/mach-pxa/pm.h | |||
@@ -29,6 +29,9 @@ extern int pxa_pm_enter(suspend_state_t state); | |||
29 | extern int pxa_pm_prepare(void); | 29 | extern int pxa_pm_prepare(void); |
30 | extern void pxa_pm_finish(void); | 30 | extern void pxa_pm_finish(void); |
31 | 31 | ||
32 | extern const char pm_enter_standby_start[], pm_enter_standby_end[]; | ||
33 | extern int pxa3xx_finish_suspend(unsigned long); | ||
34 | |||
32 | /* NOTE: this is for PM debugging on Lubbock, it's really a big | 35 | /* NOTE: this is for PM debugging on Lubbock, it's really a big |
33 | * ugly, but let's keep the crap minimum here, instead of direct | 36 | * ugly, but let's keep the crap minimum here, instead of direct |
34 | * accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c | 37 | * accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index a1c4c888f246..1ba62be65f7c 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -68,7 +68,6 @@ static unsigned long wakeup_src; | |||
68 | */ | 68 | */ |
69 | static void pxa3xx_cpu_standby(unsigned int pwrmode) | 69 | static void pxa3xx_cpu_standby(unsigned int pwrmode) |
70 | { | 70 | { |
71 | extern const char pm_enter_standby_start[], pm_enter_standby_end[]; | ||
72 | void (*fn)(unsigned int) = (void __force *)(sram + 0x8000); | 71 | void (*fn)(unsigned int) = (void __force *)(sram + 0x8000); |
73 | 72 | ||
74 | memcpy_toio(sram + 0x8000, pm_enter_standby_start, | 73 | memcpy_toio(sram + 0x8000, pm_enter_standby_start, |
@@ -106,8 +105,6 @@ static void pxa3xx_cpu_pm_suspend(void) | |||
106 | asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0)); | 105 | asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0)); |
107 | #endif | 106 | #endif |
108 | 107 | ||
109 | extern int pxa3xx_finish_suspend(unsigned long); | ||
110 | |||
111 | /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */ | 108 | /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */ |
112 | CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM); | 109 | CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM); |
113 | CKENB |= 1 << (CKEN_HSIO2 & 0x1f); | 110 | CKENB |= 1 << (CKEN_HSIO2 & 0x1f); |