diff options
author | Thierry Reding <treding@nvidia.com> | 2014-10-02 03:20:21 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-10-02 10:07:00 -0400 |
commit | a092e19b688be88f7329bd05f90cb92ebe1a4f5b (patch) | |
tree | 94f90a4cf6a2d5e2348d71c438fb3ad702ee5263 /drivers/gpio | |
parent | 3a4b094d5d09b8e0d007b2ca3de4f42df3af46e6 (diff) |
gpio: pch: Build context save/restore only for PM
The pch_gpio_save_reg_conf() and pch_gpio_restore_reg_conf() functions
are only used in pch_gpio_suspend() and pch_gpio_resume(), respectively.
Since the latter are only built if PM is enabled, make the former build
under the same conditions.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-pch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c index e0ac549dccb5..2d9a950ca2d4 100644 --- a/drivers/gpio/gpio-pch.c +++ b/drivers/gpio/gpio-pch.c | |||
@@ -171,6 +171,7 @@ static int pch_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) | |||
171 | return 0; | 171 | return 0; |
172 | } | 172 | } |
173 | 173 | ||
174 | #ifdef CONFIG_PM | ||
174 | /* | 175 | /* |
175 | * Save register configuration and disable interrupts. | 176 | * Save register configuration and disable interrupts. |
176 | */ | 177 | */ |
@@ -206,6 +207,7 @@ static void pch_gpio_restore_reg_conf(struct pch_gpio *chip) | |||
206 | iowrite32(chip->pch_gpio_reg.gpio_use_sel_reg, | 207 | iowrite32(chip->pch_gpio_reg.gpio_use_sel_reg, |
207 | &chip->reg->gpio_use_sel); | 208 | &chip->reg->gpio_use_sel); |
208 | } | 209 | } |
210 | #endif | ||
209 | 211 | ||
210 | static int pch_gpio_to_irq(struct gpio_chip *gpio, unsigned offset) | 212 | static int pch_gpio_to_irq(struct gpio_chip *gpio, unsigned offset) |
211 | { | 213 | { |