diff options
author | Peter Rosin <peda@axentia.se> | 2017-05-21 19:49:03 +0300 |
---|---|---|
committer | Peter Rosin <peda@axentia.se> | 2017-08-14 12:54:27 +0300 |
commit | fc2046718a1bdccc38d749c4453215891f7a014c (patch) | |
tree | a6d0e01168cd094383001e1a62ae2827234e7e63 /drivers/i2c/muxes/i2c-mux-pinctrl.c | |
parent | c4aee3e1b0de8e732fafd0d13e75ab7bdbc606ef (diff) | |
download | linux-fc2046718a1bdccc38d749c4453215891f7a014c.tar.xz |
i2c: mux: pinctrl: drop the idle_state member
The information is available elsewhere.
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
Diffstat (limited to 'drivers/i2c/muxes/i2c-mux-pinctrl.c')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-pinctrl.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c index aa4a3bf9507f..20b90a7a1e61 100644 --- a/drivers/i2c/muxes/i2c-mux-pinctrl.c +++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c @@ -28,7 +28,6 @@ struct i2c_mux_pinctrl { struct pinctrl *pinctrl; struct pinctrl_state **states; - struct pinctrl_state *state_idle; }; static int i2c_mux_pinctrl_select(struct i2c_mux_core *muxc, u32 chan) @@ -40,9 +39,7 @@ static int i2c_mux_pinctrl_select(struct i2c_mux_core *muxc, u32 chan) static int i2c_mux_pinctrl_deselect(struct i2c_mux_core *muxc, u32 chan) { - struct i2c_mux_pinctrl *mux = i2c_mux_priv(muxc); - - return pinctrl_select_state(mux->pinctrl, mux->state_idle); + return i2c_mux_pinctrl_select(muxc, muxc->num_adapters); } static struct i2c_adapter *i2c_mux_pinctrl_root_adapter( @@ -149,7 +146,6 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev) ret = -EINVAL; goto err_put_parent; } - mux->state_idle = mux->states[i]; muxc->deselect = i2c_mux_pinctrl_deselect; } @@ -166,7 +162,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev) dev_info(dev, "mux-locked i2c mux\n"); /* Do not add any adapter for the idle state (if it's there at all). */ - for (i = 0; i < num_names - !!mux->state_idle; i++) { + for (i = 0; i < num_names - !!muxc->deselect; i++) { ret = i2c_mux_add_adapter(muxc, 0, i, 0); if (ret) goto err_del_adapter; |