diff options
author | Stefan Agner | 2018-01-06 15:25:49 +0100 |
---|---|---|
committer | Linus Walleij | 2018-01-11 10:29:18 +0100 |
commit | f5843492ecefcf766963518f14bcf8d77b88338c (patch) | |
tree | e30b090188570ea4f1a0df45c28f2f3abda788c6 /drivers/pinctrl/freescale/pinctrl-vf610.c | |
parent | 32e21f084faacc69014b4bb082db04890fad5f1b (diff) |
pinctrl: imx: use struct imx_pinctrl_soc_info as a const
For some SoCs the struct imx_pinctrl_soc_info is passed through
of_device_id.data which is const. Most variables are already const
or otherwise not written. However, some fields are modified at
runtime. Move those fields to the dynamically allocated struct
imx_pinctrl.
Fixes: b3060044e495 ("pinctrl: freescale: imx7d: make of_device_ids const")
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/freescale/pinctrl-vf610.c')
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-vf610.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-vf610.c b/drivers/pinctrl/freescale/pinctrl-vf610.c index ac18bb6d6d5e..42745c690be3 100644 --- a/drivers/pinctrl/freescale/pinctrl-vf610.c +++ b/drivers/pinctrl/freescale/pinctrl-vf610.c @@ -300,11 +300,10 @@ static int vf610_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, unsigned offset, bool input) { struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); - struct imx_pinctrl_soc_info *info = ipctl->info; const struct imx_pin_reg *pin_reg; u32 reg; - pin_reg = &info->pin_regs[offset]; + pin_reg = &ipctl->pin_regs[offset]; if (pin_reg->mux_reg == -1) return -EINVAL; |