From: Lee Jones <lee.jones@linaro.org>
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 [thread overview]
Message-ID: <1426699279-9258-4-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1426699279-9258-1-git-send-email-lee.jones@linaro.org>
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 <maxime.coquelin@st.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
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)
{
--
1.9.1
next prev parent reply other threads:[~2015-03-18 17:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 17:21 [PATCH v2 0/6] pinctrl: st: Fix disparity between Pinctrl & GPIO in /sysfs Lee Jones
2015-03-18 17:21 ` [PATCH v2 1/6] ARM: STi: DT: STiH407: Fix retime pin mask for PIO5 and PIO35 Lee Jones
2015-04-30 11:22 ` [STLinux Kernel] " Maxime Coquelin
2015-03-18 17:21 ` [PATCH v2 2/6] pinctrl: st: Introduce a 'get pin function' call Lee Jones
2015-03-25 15:35 ` Linus Walleij
2015-03-18 17:21 ` Lee Jones [this message]
2015-03-25 15:36 ` [PATCH v2 3/6] pinctrl: st: Move st_get_pio_control() further up the source file Linus Walleij
2015-03-18 17:21 ` [PATCH v2 4/6] pinctrl: st: Supply a GPIO get_direction() call-back Lee Jones
2015-03-25 15:37 ` Linus Walleij
2015-03-18 17:21 ` [PATCH v2 5/6] pinctrl: st: Show correct pin direction -- even when in GPIO mode Lee Jones
2015-03-25 15:38 ` Linus Walleij
2015-03-18 17:21 ` [PATCH v2 6/6] pinctrl: st: Display pin's function when printing pinctrl debug information Lee Jones
2015-03-25 15:39 ` Linus Walleij
2015-03-25 14:06 ` [PATCH v2 0/6] pinctrl: st: Fix disparity between Pinctrl & GPIO in /sysfs Olivier CLERGEAUD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426699279-9258-4-git-send-email-lee.jones@linaro.org \
--to=lee.jones@linaro.org \
--cc=kernel@stlinux.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).