diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2020-09-22 21:26:52 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2020-11-19 08:34:21 +0000 |
commit | a0fa0abeb508360bea82a84ce83aea49769641d3 (patch) | |
tree | ba35f9cd055d9e3ca5de75decd26b4bb57ece7ea /drivers/mfd/da9062-core.c | |
parent | f8d86e2998e91d5a9f62b4934445d1ecadd00b30 (diff) |
mfd: da9xxx-core: Constify static struct resource
Constify a number of static struct resource. The only usage of the
structs are to assign their address to the resources field in the
mfd_cell struct. This allows the compiler to put them in read-only
memory. Done with the help of Coccinelle.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/da9062-core.c')
-rw-r--r-- | drivers/mfd/da9062-core.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c index fc30726e2e27..9583a98d3aae 100644 --- a/drivers/mfd/da9062-core.c +++ b/drivers/mfd/da9062-core.c @@ -160,23 +160,23 @@ static struct regmap_irq_chip da9062_irq_chip = { .ack_base = DA9062AA_EVENT_A, }; -static struct resource da9061_core_resources[] = { +static const struct resource da9061_core_resources[] = { DEFINE_RES_IRQ_NAMED(DA9061_IRQ_VDD_WARN, "VDD_WARN"), }; -static struct resource da9061_regulators_resources[] = { +static const struct resource da9061_regulators_resources[] = { DEFINE_RES_IRQ_NAMED(DA9061_IRQ_LDO_LIM, "LDO_LIM"), }; -static struct resource da9061_thermal_resources[] = { +static const struct resource da9061_thermal_resources[] = { DEFINE_RES_IRQ_NAMED(DA9061_IRQ_TEMP, "THERMAL"), }; -static struct resource da9061_wdt_resources[] = { +static const struct resource da9061_wdt_resources[] = { DEFINE_RES_IRQ_NAMED(DA9061_IRQ_WDG_WARN, "WD_WARN"), }; -static struct resource da9061_onkey_resources[] = { +static const struct resource da9061_onkey_resources[] = { DEFINE_RES_IRQ_NAMED(DA9061_IRQ_ONKEY, "ONKEY"), }; @@ -211,32 +211,32 @@ static const struct mfd_cell da9061_devs[] = { }, }; -static struct resource da9062_core_resources[] = { +static const struct resource da9062_core_resources[] = { DEFINE_RES_NAMED(DA9062_IRQ_VDD_WARN, 1, "VDD_WARN", IORESOURCE_IRQ), }; -static struct resource da9062_regulators_resources[] = { +static const struct resource da9062_regulators_resources[] = { DEFINE_RES_NAMED(DA9062_IRQ_LDO_LIM, 1, "LDO_LIM", IORESOURCE_IRQ), }; -static struct resource da9062_thermal_resources[] = { +static const struct resource da9062_thermal_resources[] = { DEFINE_RES_NAMED(DA9062_IRQ_TEMP, 1, "THERMAL", IORESOURCE_IRQ), }; -static struct resource da9062_wdt_resources[] = { +static const struct resource da9062_wdt_resources[] = { DEFINE_RES_NAMED(DA9062_IRQ_WDG_WARN, 1, "WD_WARN", IORESOURCE_IRQ), }; -static struct resource da9062_rtc_resources[] = { +static const struct resource da9062_rtc_resources[] = { DEFINE_RES_NAMED(DA9062_IRQ_ALARM, 1, "ALARM", IORESOURCE_IRQ), DEFINE_RES_NAMED(DA9062_IRQ_TICK, 1, "TICK", IORESOURCE_IRQ), }; -static struct resource da9062_onkey_resources[] = { +static const struct resource da9062_onkey_resources[] = { DEFINE_RES_NAMED(DA9062_IRQ_ONKEY, 1, "ONKEY", IORESOURCE_IRQ), }; -static struct resource da9062_gpio_resources[] = { +static const struct resource da9062_gpio_resources[] = { DEFINE_RES_NAMED(DA9062_IRQ_GPI0, 1, "GPI0", IORESOURCE_IRQ), DEFINE_RES_NAMED(DA9062_IRQ_GPI1, 1, "GPI1", IORESOURCE_IRQ), DEFINE_RES_NAMED(DA9062_IRQ_GPI2, 1, "GPI2", IORESOURCE_IRQ), |