diff options
Diffstat (limited to 'arch/arm/mach-at91/pm.c')
-rw-r--r-- | arch/arm/mach-at91/pm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 80e277cfcc8b..23726fb31741 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -41,8 +41,10 @@ | |||
41 | * implementation should be moved down into the pinctrl driver and get | 41 | * implementation should be moved down into the pinctrl driver and get |
42 | * called as part of the generic suspend/resume path. | 42 | * called as part of the generic suspend/resume path. |
43 | */ | 43 | */ |
44 | #ifdef CONFIG_PINCTRL_AT91 | ||
44 | extern void at91_pinctrl_gpio_suspend(void); | 45 | extern void at91_pinctrl_gpio_suspend(void); |
45 | extern void at91_pinctrl_gpio_resume(void); | 46 | extern void at91_pinctrl_gpio_resume(void); |
47 | #endif | ||
46 | 48 | ||
47 | static struct { | 49 | static struct { |
48 | unsigned long uhp_udp_mask; | 50 | unsigned long uhp_udp_mask; |
@@ -151,8 +153,9 @@ static void at91_pm_suspend(suspend_state_t state) | |||
151 | 153 | ||
152 | static int at91_pm_enter(suspend_state_t state) | 154 | static int at91_pm_enter(suspend_state_t state) |
153 | { | 155 | { |
156 | #ifdef CONFIG_PINCTRL_AT91 | ||
154 | at91_pinctrl_gpio_suspend(); | 157 | at91_pinctrl_gpio_suspend(); |
155 | 158 | #endif | |
156 | switch (state) { | 159 | switch (state) { |
157 | /* | 160 | /* |
158 | * Suspend-to-RAM is like STANDBY plus slow clock mode, so | 161 | * Suspend-to-RAM is like STANDBY plus slow clock mode, so |
@@ -192,7 +195,9 @@ static int at91_pm_enter(suspend_state_t state) | |||
192 | error: | 195 | error: |
193 | target_state = PM_SUSPEND_ON; | 196 | target_state = PM_SUSPEND_ON; |
194 | 197 | ||
198 | #ifdef CONFIG_PINCTRL_AT91 | ||
195 | at91_pinctrl_gpio_resume(); | 199 | at91_pinctrl_gpio_resume(); |
200 | #endif | ||
196 | return 0; | 201 | return 0; |
197 | } | 202 | } |
198 | 203 | ||