]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pinctrl: renesas: rza1: Make mux_conf const in rza1_pin_mux_single()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 21 Oct 2025 08:06:05 +0000 (10:06 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 23 Oct 2025 14:33:09 +0000 (16:33 +0200)
The rza1_mux_conf object pointed to by the mux_conf parameter of
rza1_pin_mux_single() is never modified.  Make it const.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://patch.msgid.link/168e06bc57081aa3c42ff9aa2740a0a108df7d34.1761033950.git.geert+renesas@glider.be
drivers/pinctrl/renesas/pinctrl-rza1.c

index 4c7326e3de07ce385374fe1ef4952597431cadce..3cfa4c8be80eafd50a6d199a7dc53803cec9aaa6 100644 (file)
@@ -668,7 +668,7 @@ static inline int rza1_pin_get(struct rza1_port *port, unsigned int pin)
  * @mux_conf: pin multiplexing descriptor
  */
 static int rza1_pin_mux_single(struct rza1_pinctrl *rza1_pctl,
-                              struct rza1_mux_conf *mux_conf)
+                              const struct rza1_mux_conf *mux_conf)
 {
        struct rza1_port *port = &rza1_pctl->ports[mux_conf->port];
        unsigned int pin = mux_conf->pin;
@@ -1118,7 +1118,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
                           unsigned int group)
 {
        struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev);
-       struct rza1_mux_conf *mux_confs;
+       const struct rza1_mux_conf *mux_confs;
        const struct function_desc *func;
        struct group_desc *grp;
        int i;
@@ -1131,7 +1131,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
        if (!func)
                return -EINVAL;
 
-       mux_confs = (struct rza1_mux_conf *)func->data;
+       mux_confs = (const struct rza1_mux_conf *)func->data;
        for (i = 0; i < grp->grp.npins; ++i) {
                int ret;