pinctrl: imx8mn: Constify imx_pinctrl_soc_info
Subsystems (4)
Fabio Estevam
maintainerPATCH 1/2 pinctrl: imx8mn: Constify imx_pinctrl_soc_info
The imx_pinctrl_soc_info structure content is never changed, so it can be declared as 'const', like it is done on all other i.MX pinctrl drivers.
Make it 'const' in this driver too.
--- drivers/pinctrl/freescale/pinctrl-imx8mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/freescale/pinctrl-imx8mn.c +1 -1
@@ -317,7 +317,7 @@ static const struct pinctrl_pin_desc imx8mn_pinctrl_pads[] = { IMX_PINCTRL_PIN(MX8MN_IOMUXC_UART4_TXD), }; -static struct imx_pinctrl_soc_info imx8mn_pinctrl_info = { +static const struct imx_pinctrl_soc_info imx8mn_pinctrl_info = { .pins = imx8mn_pinctrl_pads, .npins =ARRAY_SIZE (imx8mn_pinctrl_pads), .gpr_compatible ="fsl,imx8mn-iomuxc-gpr" ,
Signature · 1 line
2.25.1
Fabio Estevam
maintainerPATCH 2/2 pinctrl: imx8qxp: Constify imx_pinctrl_soc_info
The imx_pinctrl_soc_info structure content is never changed, so it can be declared as 'const', like it is done on all other i.MX pinctrl drivers.
Make it 'const' in this driver too.
--- drivers/pinctrl/freescale/pinctrl-imx8qxp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/freescale/pinctrl-imx8qxp.c +1 -1
@@ -194,7 +194,7 @@ static const struct pinctrl_pin_desc imx8qxp_pinctrl_pads[] = { IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_QSPI0B), }; -static struct imx_pinctrl_soc_info imx8qxp_pinctrl_info = { +static const struct imx_pinctrl_soc_info imx8qxp_pinctrl_info = { .pins = imx8qxp_pinctrl_pads, .npins =ARRAY_SIZE (imx8qxp_pinctrl_pads), .flags =IMX_USE_SCU ,
Signature · 1 line
2.25.1
RE: [PATCH 2/2] pinctrl: imx8qxp: Constify imx_pinctrl_soc_info
Quoted 9 lines
From: Fabio Estevam <[email protected]>
Sent: Tuesday, July 13, 2021 8:25 PMThe
imx_pinctrl_soc_infostructure content is never changed, so it can be declared as 'const', like it is done on all other i.MX pinctrl drivers.Make it 'const' in this driver too.
Signed-off-by Fabio Estevam <[email protected]>
BTW, you missed pinctrl-imx8dxl.c. Can you change that one too?
Regards
Aisheng
Quoted 21 lines
--- drivers/pinctrl/freescale/pinctrl-imx8qxp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/freescale/pinctrl-imx8qxp.c +1
-1@@ -194,7 +194,7 @@ static const struct pinctrl_pin_desc imx8qxp_pinctrl_pads[] = {IMX_PINCTRL_PIN (IMX8QXP_COMP_CTL_GPIO_1V8_3V3_QSPI0B ), }; -static struct imx_pinctrl_soc_info imx8qxp_pinctrl_info = { +static const struct imx_pinctrl_soc_info imx8qxp_pinctrl_info = { .pins = imx8qxp_pinctrl_pads, .npins = ARRAY_SIZE(imx8qxp_pinctrl_pads),.flags =
IMX_USE_SCU,
--
2.25.1
Quoted 10 lines
From: Fabio Estevam <[email protected]>
Sent: Tuesday, July 13, 2021 8:25 PM
Subject: [PATCH 1/2] pinctrl: imx8mn: Constifyimx_pinctrl_soc_infoThe
imx_pinctrl_soc_infostructure content is never changed, so it can be declared as 'const', like it is done on all other i.MX pinctrl drivers.Make it 'const' in this driver too.
Signed-off-by Fabio Estevam <[email protected]>
Regards
Aisheng
Quoted 21 lines
--- drivers/pinctrl/freescale/pinctrl-imx8mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/freescale/pinctrl-imx8mn.c +1
-1@@ -317,7 +317,7 @@ static const struct pinctrl_pin_desc imx8mn_pinctrl_pads[] = {IMX_PINCTRL_PIN (MX8MN_IOMUXC_UART4_TXD ), }; -static struct imx_pinctrl_soc_info imx8mn_pinctrl_info = { +static const struct imx_pinctrl_soc_info imx8mn_pinctrl_info = { .pins = imx8mn_pinctrl_pads, .npins = ARRAY_SIZE(imx8mn_pinctrl_pads),.gpr_compatible = "fsl,imx8mn-iomuxc-gpr",
--
2.25.1
Quoted 6 lines · Fabio Estevam
The
imx_pinctrl_soc_infostructure content is never changed, so it can be declared as 'const', like it is done on all other i.MX pinctrl drivers.Make it 'const' in this driver too.
Signed-off-by Fabio Estevam <[email protected]>
Both patches applied!
Yours,
Linus Walleij