diff mbox series

[1/1] pinctrl: stmfx: stmfx_pinconf_set doesn't require to get direction anymore

Message ID 20200422072513.8352-1-amelie.delaunay@st.com (mailing list archive)
State Mainlined
Commit 36126f5309b5054c2a57f7c603a6f8da1f4800d4
Headers show
Series [1/1] pinctrl: stmfx: stmfx_pinconf_set doesn't require to get direction anymore | expand

Commit Message

Amelie Delaunay April 22, 2020, 7:25 a.m. UTC
Pin direction is not used to set pin configuration.

Fixes: a502b343ebd0 ("pinctrl: stmfx: update pinconf settings")
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
---
 drivers/pinctrl/pinctrl-stmfx.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Linus Walleij April 28, 2020, 12:49 p.m. UTC | #1
On Wed, Apr 22, 2020 at 9:26 AM Amelie Delaunay <amelie.delaunay@st.com> wrote:

> Pin direction is not used to set pin configuration.
>
> Fixes: a502b343ebd0 ("pinctrl: stmfx: update pinconf settings")
> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>

Patch applied.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index 60100b45f5e5..1aae803c12cd 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -288,7 +288,7 @@  static int stmfx_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 	struct pinctrl_gpio_range *range;
 	enum pin_config_param param;
 	u32 arg;
-	int dir, i, ret;
+	int i, ret;
 
 	range = pinctrl_find_gpio_range_from_pin_nolock(pctldev, pin);
 	if (!range) {
@@ -296,10 +296,6 @@  static int stmfx_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 		return -EINVAL;
 	}
 
-	dir = stmfx_gpio_get_direction(&pctl->gpio_chip, pin);
-	if (dir < 0)
-		return dir;
-
 	for (i = 0; i < num_configs; i++) {
 		param = pinconf_to_config_param(configs[i]);
 		arg = pinconf_to_config_argument(configs[i]);