mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
pinctrl: constify pinmux_generic_get_function()
With all users of struct function_desc limited to only accessing it using the dedicated function and never modifying it, we can now constify the return value of pinmux_generic_get_function() treewide. Reviewed-by: Andy Shevchenko <andy@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas Tested-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
committed by
Linus Walleij
parent
071cdf5645
commit
fbba4a9e36
@@ -245,7 +245,7 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
|
||||
{
|
||||
struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct imx_pinctrl_soc_info *info = ipctl->info;
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
struct group_desc *grp;
|
||||
struct imx_pin *pin;
|
||||
unsigned int npins;
|
||||
|
||||
@@ -2443,7 +2443,7 @@ static int airoha_pinmux_set_mux(struct pinctrl_dev *pctrl_dev,
|
||||
{
|
||||
struct airoha_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
const struct airoha_pinctrl_func *func;
|
||||
struct function_desc *desc;
|
||||
const struct function_desc *desc;
|
||||
struct group_desc *grp;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ static int mtk_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
unsigned int selector, unsigned int group)
|
||||
{
|
||||
struct mtk_pinctrl *hw = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
struct group_desc *grp;
|
||||
int i, err;
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ static int eqbr_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
unsigned int selector, unsigned int group)
|
||||
{
|
||||
struct eqbr_pinctrl_drv_data *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
struct group_desc *grp;
|
||||
unsigned int *pinmux;
|
||||
int i;
|
||||
|
||||
@@ -4000,7 +4000,7 @@ static int ingenic_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
unsigned int selector, unsigned int group)
|
||||
{
|
||||
struct ingenic_pinctrl *jzpc = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
struct group_desc *grp;
|
||||
unsigned int i;
|
||||
uintptr_t mode;
|
||||
|
||||
@@ -935,7 +935,7 @@ static int keembay_set_mux(struct pinctrl_dev *pctldev, unsigned int fun_sel,
|
||||
unsigned int grp_sel)
|
||||
{
|
||||
struct keembay_pinctrl *kpc = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
struct group_desc *grp;
|
||||
unsigned int val;
|
||||
u8 pin_mode;
|
||||
|
||||
@@ -336,7 +336,7 @@ static int pcs_get_function(struct pinctrl_dev *pctldev, unsigned pin,
|
||||
struct pcs_device *pcs = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct pin_desc *pdesc = pin_desc_get(pctldev, pin);
|
||||
const struct pinctrl_setting_mux *setting;
|
||||
struct function_desc *function;
|
||||
const struct function_desc *function;
|
||||
unsigned fselector;
|
||||
|
||||
/* If pin is not described in DTS & enabled, mux_setting is NULL. */
|
||||
@@ -360,7 +360,7 @@ static int pcs_set_mux(struct pinctrl_dev *pctldev, unsigned fselector,
|
||||
unsigned group)
|
||||
{
|
||||
struct pcs_device *pcs;
|
||||
struct function_desc *function;
|
||||
const struct function_desc *function;
|
||||
struct pcs_function *func;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -847,8 +847,8 @@ EXPORT_SYMBOL_GPL(pinmux_generic_get_function_groups);
|
||||
* @pctldev: pin controller device
|
||||
* @selector: function number
|
||||
*/
|
||||
struct function_desc *pinmux_generic_get_function(struct pinctrl_dev *pctldev,
|
||||
unsigned int selector)
|
||||
const struct function_desc *
|
||||
pinmux_generic_get_function(struct pinctrl_dev *pctldev, unsigned int selector)
|
||||
{
|
||||
struct function_desc *function;
|
||||
|
||||
|
||||
@@ -152,8 +152,8 @@ int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev,
|
||||
const char * const **groups,
|
||||
unsigned int * const ngroups);
|
||||
|
||||
struct function_desc *pinmux_generic_get_function(struct pinctrl_dev *pctldev,
|
||||
unsigned int selector);
|
||||
const struct function_desc *
|
||||
pinmux_generic_get_function(struct pinctrl_dev *pctldev, unsigned int selector);
|
||||
|
||||
int pinmux_generic_add_function(struct pinctrl_dev *pctldev,
|
||||
const char *name,
|
||||
|
||||
@@ -1120,7 +1120,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
|
||||
{
|
||||
struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct rza1_mux_conf *mux_confs;
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
struct group_desc *grp;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ static int rza2_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
|
||||
unsigned int group)
|
||||
{
|
||||
struct rza2_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
unsigned int i, *psel_val;
|
||||
struct group_desc *grp;
|
||||
|
||||
|
||||
@@ -574,7 +574,7 @@ static int rzg2l_pinctrl_set_mux(struct pinctrl_dev *pctldev,
|
||||
{
|
||||
struct rzg2l_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct rzg2l_hwcfg *hwcfg = pctrl->data->hwcfg;
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
unsigned int i, *psel_val;
|
||||
struct group_desc *group;
|
||||
const unsigned int *pins;
|
||||
|
||||
@@ -162,7 +162,7 @@ static int rzv2m_pinctrl_set_mux(struct pinctrl_dev *pctldev,
|
||||
unsigned int group_selector)
|
||||
{
|
||||
struct rzv2m_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct function_desc *func;
|
||||
const struct function_desc *func;
|
||||
unsigned int i, *psel_val;
|
||||
struct group_desc *group;
|
||||
const unsigned int *pins;
|
||||
|
||||
Reference in New Issue
Block a user