From f5843492ecefcf766963518f14bcf8d77b88338c Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Sat, 6 Jan 2018 15:25:49 +0100 Subject: 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 Cc: Arvind Yadav Cc: Gary Bisson Signed-off-by: Stefan Agner Acked-by: Dong Aisheng Signed-off-by: Linus Walleij --- drivers/pinctrl/freescale/pinctrl-vf610.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/pinctrl/freescale/pinctrl-vf610.c') 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; -- cgit v1.2.3