Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f89e68fc authored by Lee Jones's avatar Lee Jones Committed by Linus Walleij
Browse files

pinctrl: st: Move st_get_pio_control() further up the source file



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: default avatarMaxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent c2a4bf47
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -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)
{