From patchwork Wed Mar 18 17:21:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 45986 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 321CF2153C for ; Wed, 18 Mar 2015 17:23:00 +0000 (UTC) Received: by labgm9 with SMTP id gm9sf8589929lab.1 for ; Wed, 18 Mar 2015 10:22:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=2kIL1EbQOKXY3LKbPZiQbbzX8PqaOl6ymmF9bR/Stkg=; b=AOXfZMKwPHIyjJbf+RwKH6H6Gxcu/dSz9qW9YBmsSQfdOsGug+PttsJF6RBSKlsz7J /dyROmW49QHT5Tl83imj7pYWomuP7ShSWRmjCxyxHMnRMpfvuTsoNy+e5ItnWLzr/AUw EyLkycA/Rue2/q4165rvbXp+DMAtaFBnCmp6c56JEYteIRmqL1MYzrjCBs/OSQaFpZxi ZfIhD6jGgKg/qXfvc41k4T3Kscau/3hLTjw4aAU27yE+K5k16lOOPe8l2Lej6A/ClH4q RNhg3vh8s24YGOTauIuy4cPojTs+89dCflVQX6aM9ApzxsB/n/cmCsTyzoGLNvd6ulSu jvPA== X-Gm-Message-State: ALoCoQmq5EQfRBBFFmrFdPl4o4SRIlJoCWNbMEikERSLUmMfpseLvjof9hedoAfcgJ2FFRFr7jgw X-Received: by 10.181.29.66 with SMTP id ju2mr982169wid.1.1426699379149; Wed, 18 Mar 2015 10:22:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.4 with SMTP id dc4ls190503lac.73.gmail; Wed, 18 Mar 2015 10:22:58 -0700 (PDT) X-Received: by 10.112.147.200 with SMTP id tm8mr64534575lbb.71.1426699378947; Wed, 18 Mar 2015 10:22:58 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id jc4si13377444lbc.53.2015.03.18.10.22.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 10:22:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by ladw1 with SMTP id w1so41902395lad.0 for ; Wed, 18 Mar 2015 10:22:58 -0700 (PDT) X-Received: by 10.152.178.197 with SMTP id da5mr66998235lac.56.1426699378848; Wed, 18 Mar 2015 10:22:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1295174lbj; Wed, 18 Mar 2015 10:22:58 -0700 (PDT) X-Received: by 10.67.30.103 with SMTP id kd7mr87121477pad.121.1426699377114; Wed, 18 Mar 2015 10:22:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kn1si37272743pdb.158.2015.03.18.10.22.56; Wed, 18 Mar 2015 10:22:57 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933358AbbCRRWw (ORCPT + 27 others); Wed, 18 Mar 2015 13:22:52 -0400 Received: from mail-we0-f182.google.com ([74.125.82.182]:36405 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756547AbbCRRVa (ORCPT ); Wed, 18 Mar 2015 13:21:30 -0400 Received: by wetk59 with SMTP id k59so37783449wet.3 for ; Wed, 18 Mar 2015 10:21:29 -0700 (PDT) X-Received: by 10.194.179.194 with SMTP id di2mr142160529wjc.4.1426699289321; Wed, 18 Mar 2015 10:21:29 -0700 (PDT) Received: from localhost.localdomain ([81.134.86.251]) by mx.google.com with ESMTPSA id v13sm4021936wij.10.2015.03.18.10.21.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Mar 2015 10:21:28 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linus.walleij@linaro.org, linux-gpio@vger.kernel.org Cc: lee.jones@linaro.org, kernel@stlinux.com Subject: [PATCH v2 3/6] pinctrl: st: Move st_get_pio_control() further up the source file Date: Wed, 18 Mar 2015 17:21:16 +0000 Message-Id: <1426699279-9258-4-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426699279-9258-1-git-send-email-lee.jones@linaro.org> References: <1426699279-9258-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , st_get_pio_control() will be used by subsequent calls which are to be located above its original position. This is required to prevent the need for an unnecessary forward-declaration/prototype. Acked-by: Maxime Coquelin Signed-off-by: Lee Jones --- drivers/pinctrl/pinctrl-st.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 5362e45..10ad19c 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -398,6 +398,16 @@ static const struct st_pctl_data stih407_flashdata = { .rt = 100, }; +static struct st_pio_control *st_get_pio_control( + struct pinctrl_dev *pctldev, int pin) +{ + struct pinctrl_gpio_range *range = + pinctrl_find_gpio_range_from_pin(pctldev, pin); + struct st_gpio_bank *bank = gpio_range_to_bank(range); + + return &bank->pc; +} + /* Low level functions.. */ static inline int st_gpio_bank(int gpio) { @@ -918,16 +928,6 @@ static int st_pmx_get_groups(struct pinctrl_dev *pctldev, return 0; } -static struct st_pio_control *st_get_pio_control( - struct pinctrl_dev *pctldev, int pin) -{ - struct pinctrl_gpio_range *range = - pinctrl_find_gpio_range_from_pin(pctldev, pin); - struct st_gpio_bank *bank = gpio_range_to_bank(range); - - return &bank->pc; -} - static int st_pmx_set_mux(struct pinctrl_dev *pctldev, unsigned fselector, unsigned group) {