diff mbox series

[1/2] pinctrl: imx8mn: Constify imx_pinctrl_soc_info

Message ID 20210713122513.3112941-1-festevam@gmail.com
State Accepted
Commit ff128cdb7f3ddf237989c4ff925b42c9def33f7e
Headers show
Series [1/2] pinctrl: imx8mn: Constify imx_pinctrl_soc_info | expand

Commit Message

Fabio Estevam July 13, 2021, 12:25 p.m. UTC
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.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/pinctrl/freescale/pinctrl-imx8mn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Aisheng Dong July 16, 2021, 3:46 a.m. UTC | #1
> From: Fabio Estevam <festevam@gmail.com>

> 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.

> 

> Signed-off-by: Fabio Estevam <festevam@gmail.com>


Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>


Regards
Aisheng

> ---

>  drivers/pinctrl/freescale/pinctrl-imx8mn.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mn.c

> b/drivers/pinctrl/freescale/pinctrl-imx8mn.c

> index 448a79eb4568..dbf89cfba477 100644

> --- a/drivers/pinctrl/freescale/pinctrl-imx8mn.c

> +++ b/drivers/pinctrl/freescale/pinctrl-imx8mn.c

> @@ -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
Linus Walleij July 30, 2021, 10:04 a.m. UTC | #2
On Tue, Jul 13, 2021 at 2:25 PM Fabio Estevam <festevam@gmail.com> wrote:

> 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.

>

> Signed-off-by: Fabio Estevam <festevam@gmail.com>


Both patches applied!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mn.c b/drivers/pinctrl/freescale/pinctrl-imx8mn.c
index 448a79eb4568..dbf89cfba477 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx8mn.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx8mn.c
@@ -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",