From patchwork Wed Apr 27 09:56:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102433 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2089004qge; Wed, 27 Apr 2016 02:58:09 -0700 (PDT) X-Received: by 10.66.79.162 with SMTP id k2mr10346621pax.121.1461751089707; Wed, 27 Apr 2016 02:58:09 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d84si3422365pfd.66.2016.04.27.02.58.09; Wed, 27 Apr 2016 02:58:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753777AbcD0J6F (ORCPT + 29 others); Wed, 27 Apr 2016 05:58:05 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:55661 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753238AbcD0J56 (ORCPT ); Wed, 27 Apr 2016 05:57:58 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MN62C-1b1xvd0CSW-006cbZ; Wed, 27 Apr 2016 11:57:37 +0200 From: Arnd Bergmann To: Laurent Pinchart , Geert Uytterhoeven , Linus Walleij Cc: Arnd Bergmann , Simon Horman , Wolfram Sang , Ulrich Hecht , Laxman Dewangan , Hisashi Nakamura , Takeshi Kihara , linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] pinctrl: ish-pfc: avoid unused variable warning Date: Wed, 27 Apr 2016 11:56:49 +0200 Message-Id: <1461751049-2751427-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:BVTihxFyWne+p5l2nUxU+JyQ8vOBZ4+DTghGOGtJbgufbVGzebN T3E3JaitfbmkXQVMPdSOxDN3RByZkIJFjCIhPDgf6PsjrKvYNlCGdp8jfgomCk23Eu0Eman Wd9NFePiMO1L9hAjiluJtYieH7yzIq5p+ejeJ7NiNDCES1I85kuaD3Gd2QGUvP5yK0X1EHi 7nm7/47sK2Eqf+K2xOjew== X-UI-Out-Filterresults: notjunk:1; V01:K0:XHeL9WEzzik=:2gWK2yExwFSA8YeQvBH1HN fJ+QVsHzeICORRtBMGNvTjlSgohYn7UjPA64UC0/FZxT7tzzyiq65P7V1Q5zqlDlZDeB0+1rZ rhl+udxugxTknjNPorXhgHqUj6rAdIf+lX4ErFcxQi8h6eaWmAcAr7DpeTN06S13nFQp8uaGo XsPfWjK/2rnuJiB23L+lcfQTPp2BVvJYBjBgCy45OZLmPSmzvbKp5mnQnvXr51Qu9/mnAx4D5 PW0LIEPGxb104rkjaeMthu7uenYO/a3zQPfDNIvWFnq3nKyWgomJXnbWSNFL9BxRA9A3A1FDj rymqjVe0uNaN5hu50oBh0eujk+WJKXFMh6TvlWeIN6HXRMDpKk7dvGfrFO6icbO/zX0xwN46N 85+qZ9q3fX4+BWlak0kdYox0vUJads4BSOuQNL0ldKZn4WMpBkswpNOcj6SJ/fuoBJ4Y1rTKG Dshfm1gXDLiyYuKekgmdMhFx3dN0NWx3jAJnGvsoZhGjnDy7catE4moBkSJN4FBCintqu7HTu IgkxWkbXK2/4W8eQJuoWlyXXzoT5w8tSdoHcoTHjfNea8xSL/LGnG7EbKWLpt1qzHhbG7F9KR RQIFALhSbuB9H9DENJU+UbU5BIWOe/E/EsBbCSTtLfS6Q+rMuoPM5Oq8iWqV1XNuzUENFFRK6 ZqBit/PS6KIK8SZgIKyYYpMsiYgkdftPvJ2PHDpNlFdYKWsZpDOvQ1sl545tUEbKSaw0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After the conversion to devm_pinctrl_register, we get a warning in sh_pfc_remove when CONFIG_PINCTRL_SH_PFC_GPIO is disabled: drivers/pinctrl/sh-pfc/core.c: In function 'sh_pfc_remove': drivers/pinctrl/sh-pfc/core.c:603:17: unused variable 'pfc' [-Werror=unused-variable] struct sh_pfc *pfc = platform_get_drvdata(pdev); This moves the variable definition inside of the same ifdef that has the only user, to get a clean build again. Signed-off-by: Arnd Bergmann Fixes: 67ec8d7b4846 ("pinctrl: ish-pfc: Use devm_pinctrl_register() for pinctrl registration") --- drivers/pinctrl/sh-pfc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index 7ed9c80ba3ed..c9ee31c9952b 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -600,9 +600,9 @@ static int sh_pfc_probe(struct platform_device *pdev) static int sh_pfc_remove(struct platform_device *pdev) { +#ifdef CONFIG_PINCTRL_SH_PFC_GPIO struct sh_pfc *pfc = platform_get_drvdata(pdev); -#ifdef CONFIG_PINCTRL_SH_PFC_GPIO sh_pfc_unregister_gpiochip(pfc); #endif