]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: at91: Constify struct at91_pinctrl_mux_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Wed, 12 May 2021 18:01:40 +0000 (20:01 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 25 May 2021 15:10:05 +0000 (17:10 +0200)
commitc2c8019a0bb9c49bacef1cddb5e325751c26ac8c
treef18c31d57055cb8b6d10dc10dc7aa2248bec6729
parentd4d9aecd9bba724a6eb28146914c2f1e439767a0
pinctrl: at91: Constify struct at91_pinctrl_mux_ops

The at91_pinctrl_mux_ops struct is never modified by the driver. Make it
const wherever it is possible to allow the compiler to put the static
variables in read-only memory. Note that sam9x60_ops was already const,
but the const was cast away when the return value of of_match_device() was
cast to a pointer to a non-const struct at91_pinctrl_mux_ops.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210512180140.33293-1-rikard.falkeborn@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-at91.c