* [PATCH] pinctrl: rk805: Constify rk805_gpio_cfgs
@ 2020-04-25 20:38 Rikard Falkeborn
2020-05-12 11:36 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Rikard Falkeborn @ 2020-04-25 20:38 UTC (permalink / raw)
To: linux-gpio, linux-kernel
Cc: linus.walleij, nishkadg.linux, matti.vaittinen, chenjh, Rikard Falkeborn
Mark pin_cfg as const, allowing the compiler to put the struct in
.rodata instead of .data.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/pinctrl/pinctrl-rk805.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-rk805.c b/drivers/pinctrl/pinctrl-rk805.c
index cccbe072274e..c6f4229eb106 100644
--- a/drivers/pinctrl/pinctrl-rk805.c
+++ b/drivers/pinctrl/pinctrl-rk805.c
@@ -73,7 +73,7 @@ struct rk805_pctrl_info {
int num_pin_groups;
const struct pinctrl_pin_desc *pins;
unsigned int num_pins;
- struct rk805_pin_config *pin_cfg;
+ const struct rk805_pin_config *pin_cfg;
};
enum rk805_pinmux_option {
@@ -121,7 +121,7 @@ static const struct rk805_pin_group rk805_pin_groups[] = {
#define RK805_GPIO0_VAL_MSK BIT(0)
#define RK805_GPIO1_VAL_MSK BIT(1)
-static struct rk805_pin_config rk805_gpio_cfgs[] = {
+static const struct rk805_pin_config rk805_gpio_cfgs[] = {
{
.reg = RK805_OUT_REG,
.val_msk = RK805_GPIO0_VAL_MSK,
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: rk805: Constify rk805_gpio_cfgs
2020-04-25 20:38 [PATCH] pinctrl: rk805: Constify rk805_gpio_cfgs Rikard Falkeborn
@ 2020-05-12 11:36 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2020-05-12 11:36 UTC (permalink / raw)
To: Rikard Falkeborn
Cc: open list:GPIO SUBSYSTEM, linux-kernel, Nishka Dasgupta,
Matti Vaittinen, Jianhong Chen
On Sat, Apr 25, 2020 at 10:38 PM Rikard Falkeborn
<rikard.falkeborn@gmail.com> wrote:
> Mark pin_cfg as const, allowing the compiler to put the struct in
> .rodata instead of .data.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-12 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 20:38 [PATCH] pinctrl: rk805: Constify rk805_gpio_cfgs Rikard Falkeborn
2020-05-12 11:36 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.