Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp216124pxb; Thu, 12 Nov 2020 01:43:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLpLwJ1q4aUcS8ryjP1SopZoxyOWD8iJd5OlwAi/W/dlxaCaTFRqpCAYfD/EvULfrvcndO X-Received: by 2002:aa7:d351:: with SMTP id m17mr4283468edr.215.1605174235537; Thu, 12 Nov 2020 01:43:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605174235; cv=none; d=google.com; s=arc-20160816; b=VQMIk/E69BX5WscG3TN72L1+XYx4k9JP5adOUJ5Ks4KHlEuyKp+DnLBNi2e3VjttAQ xHYQuhq/vMAMTmhNljfkeNE+bzYyRfSzqxOgMJky8Rng9i8ZsdS8xSzURMneY4EUvnt/ YbHMR86lDZ7P4kf9KKd4zoW1ouysI57nYBfmlifhKC8kqglw6N4o6QS08vrfMdxYt+GK QoaAV4yHba8vLAGhRh9OkOvsYg2CtmSE/fIu/2jDAwRNafiluknehK8phegmTIzTX7IG xUp7PciBtHt0EMBs8SsBicbRYwfTsavE1FIsDPfmJ5xg1c78IR0mr7hIVXzBDOOrob+H mS5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dsnWEKHYtpjzOtFjGluTaKAH0r24lNymlUc94ld1ook=; b=FLUEub4kxsVa611KtU+OEM0gIFjv92aYzJQlpaKmReQSSLBSdKu8A23lX6pg2GgQWk VUjZNjC/NCGbHXQyXXDwv0olTKYj7gwE5cWrap3FxFh26r7JfX4nxCyCbtmqsx2HGGwI lfOa3rsUJ4HQb9A8CcCJ9HuwWd4ZlHogNSdJRupMihwHZrGDa6q4eSRhC+np6NkeF4GG TWnHsbv+5bwlWDOLwOdZswDBij7ADkHOPkuFvZeIJCrRT+7Zz9OwBLYRG9tynUyExB7+ fZP46bm7eThuZXE8gVQAmlfz4JY/yMdaR6x3BAZK8cAP16lfzlMxRY61E0e/AZFGe8yY U0aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ebPtr5ji; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s16si3488312edt.488.2020.11.12.01.43.31; Thu, 12 Nov 2020 01:43:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ebPtr5ji; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727695AbgKLJjX (ORCPT + 99 others); Thu, 12 Nov 2020 04:39:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbgKLJjW (ORCPT ); Thu, 12 Nov 2020 04:39:22 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92A1CC0613D4 for ; Thu, 12 Nov 2020 01:39:22 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id l1so5240032wrb.9 for ; Thu, 12 Nov 2020 01:39:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=dsnWEKHYtpjzOtFjGluTaKAH0r24lNymlUc94ld1ook=; b=ebPtr5jihm7n0+xxxux+6E7bAaSvsYFXJVg/5Aux3frhL/3hgi6KD8FeoPMaF5rKqu Wvzyt8EmvS9i7LEaDVeKth/eTJy3w2hGeBS/Cdw6a41i1+b5p9Y0ZYedDk2GYmLtL5gn rxB5DlnzUzes7vCH2TJdGWiXTPdm9EPRhAL03eh9XDRVwqv21OXomEzs6d0G5l8tZtQ0 8eiWcqJ/gWU8CFpIPgtTzthbHaO7RKvTNf6/4D3khZH9WgMyHvWv9dW5kixDI0Nm4KP2 N1o68aAb7nbvg8ua35e35onjzlb+kzozKhfrEoK/lvnAucLmEE5FnSpmmrzvBC738ie3 pdgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=dsnWEKHYtpjzOtFjGluTaKAH0r24lNymlUc94ld1ook=; b=qKgVWiQFNZKTOURAgVVpTxnGbLgoEz5HBo5R3ao5vsSMd1QIJrN1YaTES/W1iD5tmV YJuYprHnj4Sd/Z+RaDNZe8P+lu/gA7O1Oq8JuDGxPqfZvrgUwDUXf4U+JD4icPW6JZeo CM/8FWXZnf87cfKJXi9/YKWra/3gs2JyjhRyOQj6DH72mZ/pntgxYeYkOeLLAzOtI7fv 1OXT9mOajL1OaJ2Tzhi33OZhxMKSVtFPpzrKhYT00tUksSpLrgDbHbvq2d0URUBNijmR mK6l+yVXH5kL8VehYpayTT9r7r5gFCQI5ggUHXcFt/c/2kkYjzBExm+i+pqzzTnpYHpK EdsA== X-Gm-Message-State: AOAM531DilSvBXrjNxMmrxTpMtH4p6HtAum96D1qnfrkLebzJh1l+A+f yrTz5MtQv6YTUu6GnoyOXcp7LA== X-Received: by 2002:adf:fc84:: with SMTP id g4mr26906936wrr.202.1605173961083; Thu, 12 Nov 2020 01:39:21 -0800 (PST) Received: from dell ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id r1sm6516199wro.18.2020.11.12.01.39.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 01:39:20 -0800 (PST) Date: Thu, 12 Nov 2020 09:39:18 +0000 From: Lee Jones To: linus.walleij@linaro.org Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Russell King , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches Subject: [PATCH v2 16/25] arch: arm: mach-at91: pm: Move prototypes to mutually included header Message-ID: <20201112093918.GV2063125@dell> References: <20200713144930.1034632-1-lee.jones@linaro.org> <20200713144930.1034632-17-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200713144930.1034632-17-lee.jones@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Both the caller and the supplier's source file should have access to the include file containing the prototypes. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-at91.c:1637:6: warning: no previous prototype for ‘at91_pinctrl_gpio_suspend’ [-Wmissing-prototypes] 1637 | void at91_pinctrl_gpio_suspend(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-at91.c:1661:6: warning: no previous prototype for ‘at91_pinctrl_gpio_resume’ [-Wmissing-prototypes] 1661 | void at91_pinctrl_gpio_resume(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ Cc: Russell King Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Lee Jones --- v2: Moved shared header to: include/soc/at91/pm.h arch/arm/mach-at91/pm.c | 19 ++++++++----------- drivers/pinctrl/pinctrl-at91.c | 2 ++ include/soc/at91/pm.h | 9 +++++++++ 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 include/soc/at91/pm.h diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 120f9aa6fff32..90dcdfe3b3d0d 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -17,6 +17,8 @@ #include #include +#include + #include #include #include @@ -25,17 +27,6 @@ #include "generic.h" #include "pm.h" -/* - * FIXME: this is needed to communicate between the pinctrl driver and - * the PM implementation in the machine. Possibly part of the PM - * implementation should be moved down into the pinctrl driver and get - * called as part of the generic suspend/resume path. - */ -#ifdef CONFIG_PINCTRL_AT91 -extern void at91_pinctrl_gpio_suspend(void); -extern void at91_pinctrl_gpio_resume(void); -#endif - struct at91_soc_pm { int (*config_shdwc_ws)(void __iomem *shdwc, u32 *mode, u32 *polarity); int (*config_pmc_ws)(void __iomem *pmc, u32 mode, u32 polarity); @@ -326,6 +317,12 @@ static void at91_pm_suspend(suspend_state_t state) static int at91_pm_enter(suspend_state_t state) { #ifdef CONFIG_PINCTRL_AT91 + /* + * FIXME: this is needed to communicate between the pinctrl driver and + * the PM implementation in the machine. Possibly part of the PM + * implementation should be moved down into the pinctrl driver and get + * called as part of the generic suspend/resume path. + */ at91_pinctrl_gpio_suspend(); #endif diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 72edc675431ce..0a7e10d39505c 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -23,6 +23,8 @@ /* Since we request GPIOs from ourself */ #include +#include + #include "pinctrl-at91.h" #include "core.h" diff --git a/include/soc/at91/pm.h b/include/soc/at91/pm.h new file mode 100644 index 0000000000000..0fd5093f7f73a --- /dev/null +++ b/include/soc/at91/pm.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * atmel platform data + */ + +#ifdef CONFIG_PINCTRL_AT91 +void at91_pinctrl_gpio_suspend(void); +void at91_pinctrl_gpio_resume(void); +#endif -- 2.25.1