Message ID | 20190409070714.8164-1-linus.walleij@linaro.org |
---|---|
State | Accepted |
Commit | 21989587f6d0c900195ac818cc55b9a20f960904 |
Headers | show |
Series | pinctrl: artpec6: Drop unused function and rename | expand |
On Tue, Apr 09, 2019 at 09:07:14AM +0200, Linus Walleij wrote: > The pincontrol callbacks used to be symmetric: > enable/disable. > > However for a while we only have one function that > set the muxing, no disabling. > > Drop the unused disable function, and rename the > *enable() function to *set(). > > Reported-by: Nathan Chancellor <natechancellor@gmail.com> > Cc: YueHaibing <yuehaibing@huawei.com> > Cc: Jesper Nilsson <jesper.nilsson@axis.com> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Thank you for the fix! > --- > drivers/pinctrl/pinctrl-artpec6.c | 21 ++++----------------- > 1 file changed, 4 insertions(+), 17 deletions(-) > > diff --git a/drivers/pinctrl/pinctrl-artpec6.c b/drivers/pinctrl/pinctrl-artpec6.c > index e836850bd268..e3239cf926f9 100644 > --- a/drivers/pinctrl/pinctrl-artpec6.c > +++ b/drivers/pinctrl/pinctrl-artpec6.c > @@ -688,9 +688,9 @@ static void artpec6_pmx_select_func(struct pinctrl_dev *pctldev, > } > } > > -static int artpec6_pmx_enable(struct pinctrl_dev *pctldev, > - unsigned int function, > - unsigned int group) > +static int artpec6_pmx_set(struct pinctrl_dev *pctldev, > + unsigned int function, > + unsigned int group) > { > struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); > > @@ -703,19 +703,6 @@ static int artpec6_pmx_enable(struct pinctrl_dev *pctldev, > return 0; > } > > -static void artpec6_pmx_disable(struct pinctrl_dev *pctldev, > - unsigned int function, > - unsigned int group) > -{ > - struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); > - > - dev_dbg(pmx->dev, "disabling %s function for pin group %s\n", > - artpec6_pmx_get_fname(pctldev, function), > - artpec6_get_group_name(pctldev, group)); > - > - artpec6_pmx_select_func(pctldev, function, group, false); > -} > - > static int artpec6_pmx_request_gpio(struct pinctrl_dev *pctldev, > struct pinctrl_gpio_range *range, > unsigned int pin) > @@ -739,7 +726,7 @@ static const struct pinmux_ops artpec6_pmx_ops = { > .get_functions_count = artpec6_pmx_get_functions_count, > .get_function_name = artpec6_pmx_get_fname, > .get_function_groups = artpec6_pmx_get_fgroups, > - .set_mux = artpec6_pmx_enable, > + .set_mux = artpec6_pmx_set, > .gpio_request_enable = artpec6_pmx_request_gpio, > }; > > -- > 2.20.1 >
On Tue, Apr 09, 2019 at 09:07:14AM +0200, Linus Walleij wrote: > The pincontrol callbacks used to be symmetric: > enable/disable. > > However for a while we only have one function that > set the muxing, no disabling. > > Drop the unused disable function, and rename the > *enable() function to *set(). > > Reported-by: Nathan Chancellor <natechancellor@gmail.com> > Cc: YueHaibing <yuehaibing@huawei.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> /^JN - Jesper Nilsson -- Jesper Nilsson -- jesper.nilsson@axis.com
diff --git a/drivers/pinctrl/pinctrl-artpec6.c b/drivers/pinctrl/pinctrl-artpec6.c index e836850bd268..e3239cf926f9 100644 --- a/drivers/pinctrl/pinctrl-artpec6.c +++ b/drivers/pinctrl/pinctrl-artpec6.c @@ -688,9 +688,9 @@ static void artpec6_pmx_select_func(struct pinctrl_dev *pctldev, } } -static int artpec6_pmx_enable(struct pinctrl_dev *pctldev, - unsigned int function, - unsigned int group) +static int artpec6_pmx_set(struct pinctrl_dev *pctldev, + unsigned int function, + unsigned int group) { struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); @@ -703,19 +703,6 @@ static int artpec6_pmx_enable(struct pinctrl_dev *pctldev, return 0; } -static void artpec6_pmx_disable(struct pinctrl_dev *pctldev, - unsigned int function, - unsigned int group) -{ - struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); - - dev_dbg(pmx->dev, "disabling %s function for pin group %s\n", - artpec6_pmx_get_fname(pctldev, function), - artpec6_get_group_name(pctldev, group)); - - artpec6_pmx_select_func(pctldev, function, group, false); -} - static int artpec6_pmx_request_gpio(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, unsigned int pin) @@ -739,7 +726,7 @@ static const struct pinmux_ops artpec6_pmx_ops = { .get_functions_count = artpec6_pmx_get_functions_count, .get_function_name = artpec6_pmx_get_fname, .get_function_groups = artpec6_pmx_get_fgroups, - .set_mux = artpec6_pmx_enable, + .set_mux = artpec6_pmx_set, .gpio_request_enable = artpec6_pmx_request_gpio, };
The pincontrol callbacks used to be symmetric: enable/disable. However for a while we only have one function that set the muxing, no disabling. Drop the unused disable function, and rename the *enable() function to *set(). Reported-by: Nathan Chancellor <natechancellor@gmail.com> Cc: YueHaibing <yuehaibing@huawei.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- drivers/pinctrl/pinctrl-artpec6.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) -- 2.20.1