diff mbox

gpio: pch: Build context save/restore only for PM

Message ID 1412234421-11065-1-git-send-email-thierry.reding@gmail.com
State Accepted
Headers show

Commit Message

Thierry Reding Oct. 2, 2014, 7:20 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

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>
---
 drivers/gpio/gpio-pch.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Linus Walleij Oct. 2, 2014, 8:01 a.m. UTC | #1
On Thu, Oct 2, 2014 at 9:20 AM, Thierry Reding <thierry.reding@gmail.com> wrote:

> From: Thierry Reding <treding@nvidia.com>
>
> 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>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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)
 	return 0;
 }
 
+#ifdef CONFIG_PM
 /*
  * Save register configuration and disable interrupts.
  */
@@ -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)
 {