From patchwork Thu Oct 2 07:20:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 395814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C76951400E9 for ; Thu, 2 Oct 2014 17:20:25 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751185AbaJBHUY (ORCPT ); Thu, 2 Oct 2014 03:20:24 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:56663 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbaJBHUY (ORCPT ); Thu, 2 Oct 2014 03:20:24 -0400 Received: by mail-wg0-f46.google.com with SMTP id k14so2587266wgh.17 for ; Thu, 02 Oct 2014 00:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=TWIIpXAWowMuwEOpZcICVtIHdWHe2Qv5wD17R/ZRgfM=; b=sIHCKQxVjIBnFAWkmH0+keoIFOaRomyd7Tpihj5+CjsG6uwAqRFdjALBRRsex+kCkH QqCx+jUwVWxugoqnnRCg3weFMEuC7IbOZDrMPzpCr9sul4kyDVZMM7IhIbMEeOVrh0FF kEK2r/GzlBeNR7jPP71ykp7A7ykF85bc8zeoQ5RDS5MAfRFRny/EnPgc2Ml3xedXwv9b 71L4dk1NTchYUJDmLcok+UKyqrgBBsyC//k3KFVjUPCJPJMDtecgDQEYaZti6E1mEIdf b2bKfqemot5635gNKBwMlZYHkXWqur7HHGefljnSGJHkJHrngJQObb594QPgICrnmfSc kM7w== X-Received: by 10.194.78.76 with SMTP id z12mr45361773wjw.24.1412234422902; Thu, 02 Oct 2014 00:20:22 -0700 (PDT) Received: from localhost (port-49109.pppoe.wtnet.de. [46.59.192.110]) by mx.google.com with ESMTPSA id mz16sm233800wic.13.2014.10.02.00.20.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Oct 2014 00:20:22 -0700 (PDT) From: Thierry Reding To: Linus Walleij , Alexandre Courbot Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: pch: Build context save/restore only for PM Date: Thu, 2 Oct 2014 09:20:21 +0200 Message-Id: <1412234421-11065-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Thierry Reding 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 --- 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) {