linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: pch: Build context save/restore only for PM
@ 2014-10-02  7:20 Thierry Reding
  2014-10-02  8:01 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2014-10-02  7:20 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot; +Cc: linux-gpio, linux-kernel

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(+)

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)
 {
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: pch: Build context save/restore only for PM
  2014-10-02  7:20 [PATCH] gpio: pch: Build context save/restore only for PM Thierry Reding
@ 2014-10-02  8:01 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2014-10-02  8:01 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Alexandre Courbot, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-02  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02  7:20 [PATCH] gpio: pch: Build context save/restore only for PM Thierry Reding
2014-10-02  8:01 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).