Skip to content

Commit aa09d5a

Browse files
committed
pinctrl: renesas: rza1: Make mux_conf const in rza1_pin_mux_single()
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
1 parent bf48f99 commit aa09d5a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/pinctrl/renesas/pinctrl-rza1.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ static inline int rza1_pin_get(struct rza1_port *port, unsigned int pin)
668668
* @mux_conf: pin multiplexing descriptor
669669
*/
670670
static int rza1_pin_mux_single(struct rza1_pinctrl *rza1_pctl,
671-
struct rza1_mux_conf *mux_conf)
671+
const struct rza1_mux_conf *mux_conf)
672672
{
673673
struct rza1_port *port = &rza1_pctl->ports[mux_conf->port];
674674
unsigned int pin = mux_conf->pin;
@@ -1118,7 +1118,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
11181118
unsigned int group)
11191119
{
11201120
struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev);
1121-
struct rza1_mux_conf *mux_confs;
1121+
const struct rza1_mux_conf *mux_confs;
11221122
const struct function_desc *func;
11231123
struct group_desc *grp;
11241124
int i;
@@ -1131,7 +1131,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
11311131
if (!func)
11321132
return -EINVAL;
11331133

1134-
mux_confs = (struct rza1_mux_conf *)func->data;
1134+
mux_confs = (const struct rza1_mux_conf *)func->data;
11351135
for (i = 0; i < grp->grp.npins; ++i) {
11361136
int ret;
11371137

0 commit comments

Comments
 (0)