2024-05-06 15:12:44

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 04/13] mfd: pm8008: mark regmap structures as const

The regmap irq chip structures can be const so mark them as such.

Signed-off-by: Johan Hovold <[email protected]>
---
drivers/mfd/qcom-pm8008.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c
index d0f190c2ea2b..42dd4bf039c9 100644
--- a/drivers/mfd/qcom-pm8008.c
+++ b/drivers/mfd/qcom-pm8008.c
@@ -51,7 +51,7 @@ enum {
POLARITY_LO_INDEX,
};

-static unsigned int pm8008_config_regs[] = {
+static const unsigned int pm8008_config_regs[] = {
INT_SET_TYPE_OFFSET,
INT_POL_HIGH_OFFSET,
INT_POL_LOW_OFFSET,
@@ -131,7 +131,7 @@ static int pm8008_set_type_config(unsigned int **buf, unsigned int type,
return 0;
}

-static struct regmap_irq_chip pm8008_irq_chip = {
+static const struct regmap_irq_chip pm8008_irq_chip = {
.name = "pm8008_irq",
.main_status = I2C_INTR_STATUS_BASE,
.num_main_regs = 1,
--
2.43.2



2024-05-08 17:38:01

by Bryan O'Donoghue

[permalink] [raw]
Subject: Re: [PATCH 04/13] mfd: pm8008: mark regmap structures as const

On 06/05/2024 16:08, Johan Hovold wrote:
> The regmap irq chip structures can be const so mark them as such.
>
> Signed-off-by: Johan Hovold <[email protected]>
> ---
> drivers/mfd/qcom-pm8008.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c
> index d0f190c2ea2b..42dd4bf039c9 100644
> --- a/drivers/mfd/qcom-pm8008.c
> +++ b/drivers/mfd/qcom-pm8008.c
> @@ -51,7 +51,7 @@ enum {
> POLARITY_LO_INDEX,
> };
>
> -static unsigned int pm8008_config_regs[] = {
> +static const unsigned int pm8008_config_regs[] = {
> INT_SET_TYPE_OFFSET,
> INT_POL_HIGH_OFFSET,
> INT_POL_LOW_OFFSET,
> @@ -131,7 +131,7 @@ static int pm8008_set_type_config(unsigned int **buf, unsigned int type,
> return 0;
> }
>
> -static struct regmap_irq_chip pm8008_irq_chip = {
> +static const struct regmap_irq_chip pm8008_irq_chip = {
> .name = "pm8008_irq",
> .main_status = I2C_INTR_STATUS_BASE,
> .num_main_regs = 1,

Reviewed-by: Bryan O'Donoghue <[email protected]>

2024-05-08 22:03:44

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 04/13] mfd: pm8008: mark regmap structures as const

Quoting Johan Hovold (2024-05-06 08:08:21)
> The regmap irq chip structures can be const so mark them as such.
>
> Signed-off-by: Johan Hovold <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>