From patchwork Wed Mar 18 10:51:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 45932 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B66112153B for ; Wed, 18 Mar 2015 10:53:07 +0000 (UTC) Received: by lbdu10 with SMTP id u10sf2143750lbd.3 for ; Wed, 18 Mar 2015 03:53:06 -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=T/GJkuhMhP66XHokP/6GEcfiHk7HP+hXMWhj+E4hTus=; b=WINHWGjCROuXbHD9Pd0bDn8ySv/P3QEUIrZp1mrE60kr/3IPVWYCi83wlz3l+7wBIl QAT/r2QTqzIx+1Jh5ko0wvZsSI0IDBq37yAuKmXIpX5rmi9tXCWO1OlJ1CqypYiFCBlz g9TF90hy41NvJTDJk4wvhRo28Wdm4Bcx9EiZspwSLcaNp3OzSG1MBRppzdWWaSQQPeRS sC8En/9Gphd1yxsUrjeKHYIvZnE/3Q7Z10GlqVH0IWNnP1AguJJal3eC17GuFLMS4PY/ WQlpwbIVVAD0kN5k8OhGXRMy6kuHIrhnYBMoSNqNDAr5UPzUffHTKfDjrty11hHHhvxv DCrg== X-Gm-Message-State: ALoCoQnAmi4Z1m+5obrO7vdWm4BR309uta7yNFO+qjSdP+l+4oMSV2oZlts/ELijBVaQISYuMmXq X-Received: by 10.180.9.228 with SMTP id d4mr270029wib.1.1426675986431; Wed, 18 Mar 2015 03:53:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.199 with SMTP id x7ls149273lae.0.gmail; Wed, 18 Mar 2015 03:53:06 -0700 (PDT) X-Received: by 10.152.28.233 with SMTP id e9mr63771792lah.3.1426675986218; Wed, 18 Mar 2015 03:53:06 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id bc19si12608239lab.132.2015.03.18.03.53.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 03:53:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by labjg1 with SMTP id jg1so32483345lab.2 for ; Wed, 18 Mar 2015 03:53:06 -0700 (PDT) X-Received: by 10.152.8.15 with SMTP id n15mr36573486laa.41.1426675986126; Wed, 18 Mar 2015 03:53:06 -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 h5csp1072610lbj; Wed, 18 Mar 2015 03:53:05 -0700 (PDT) X-Received: by 10.66.221.8 with SMTP id qa8mr27400082pac.62.1426675984382; Wed, 18 Mar 2015 03:53:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce13si35250182pdb.224.2015.03.18.03.53.03; Wed, 18 Mar 2015 03:53:04 -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 S1756102AbbCRKw7 (ORCPT + 27 others); Wed, 18 Mar 2015 06:52:59 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:36756 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755785AbbCRKvy (ORCPT ); Wed, 18 Mar 2015 06:51:54 -0400 Received: by wibg7 with SMTP id g7so86627943wib.1 for ; Wed, 18 Mar 2015 03:51:53 -0700 (PDT) X-Received: by 10.180.23.193 with SMTP id o1mr5838507wif.14.1426675913678; Wed, 18 Mar 2015 03:51:53 -0700 (PDT) Received: from localhost.localdomain ([81.134.86.251]) by mx.google.com with ESMTPSA id gz3sm2665532wib.1.2015.03.18.03.51.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Mar 2015 03:51:52 -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 3/6] pinctrl: st: Move st_get_pio_control() further up the source file Date: Wed, 18 Mar 2015 10:51:36 +0000 Message-Id: <1426675899-19882-4-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426675899-19882-1-git-send-email-lee.jones@linaro.org> References: <1426675899-19882-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.42 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. 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) {