Skip to contentSkip to conversation

pinctrl: imx8mn: Constify imx_pinctrl_soc_info

PATCH In review Fabio Estevam 3 participants 5 messages Jul 13, 2021 – Jul 30, 2021

Subsystems (4)
lore
Share & tools
lore

Fabio Estevam

author maintainer
#0 lore raw

PATCH 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
index 448a79eb4568..dbf89cfba477 100644
@@ -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
author maintainer
#1 lore raw

PATCH 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
index 4f97813ba8b7..0a0acc0038d0 100644
@@ -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
maintainer Reviewed-by on v1 2/2
#2 lore raw

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 PM

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.

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
index 4f97813ba8b7..0a0acc0038d0 100644
@@ -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

maintainer Reviewed-by on v1 1/2
#3 lore raw
In reply to Fabio Estevam
Quoted 10 lines

From: Fabio Estevam <[email protected]>
Sent: Tuesday, July 13, 2021 8:25 PM
Subject: [PATCH 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.

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
index 448a79eb4568..dbf89cfba477 100644
@@ -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