Skip to content

Commit

Permalink
gpio: pch: Build context save/restore only for PM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thierryreding authored and linusw committed Oct 2, 2014
1 parent 3a4b094 commit a092e19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpio/gpio-pch.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ static int pch_gpio_direction_input(struct gpio_chip *gpio, unsigned nr)
return 0;
}

#ifdef CONFIG_PM
/*
* Save register configuration and disable interrupts.
*/
Expand Down Expand Up @@ -206,6 +207,7 @@ static void pch_gpio_restore_reg_conf(struct pch_gpio *chip)
iowrite32(chip->pch_gpio_reg.gpio_use_sel_reg,
&chip->reg->gpio_use_sel);
}
#endif

static int pch_gpio_to_irq(struct gpio_chip *gpio, unsigned offset)
{
Expand Down

0 comments on commit a092e19

Please sign in to comment.