From a0fa0abeb508360bea82a84ce83aea49769641d3 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Tue, 22 Sep 2020 21:26:52 +0200 Subject: 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 Acked-by: Adam Thomson Signed-off-by: Lee Jones --- drivers/mfd/da9055-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/mfd/da9055-core.c') diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c index 6d0af8486269..d074d213e661 100644 --- a/drivers/mfd/da9055-core.c +++ b/drivers/mfd/da9055-core.c @@ -254,14 +254,14 @@ const struct regmap_config da9055_regmap_config = { }; EXPORT_SYMBOL_GPL(da9055_regmap_config); -static struct resource da9055_onkey_resource = { +static const struct resource da9055_onkey_resource = { .name = "ONKEY", .start = DA9055_IRQ_NONKEY, .end = DA9055_IRQ_NONKEY, .flags = IORESOURCE_IRQ, }; -static struct resource da9055_rtc_resource[] = { +static const struct resource da9055_rtc_resource[] = { { .name = "ALM", .start = DA9055_IRQ_ALARM, @@ -276,14 +276,14 @@ static struct resource da9055_rtc_resource[] = { }, }; -static struct resource da9055_hwmon_resource = { +static const struct resource da9055_hwmon_resource = { .name = "HWMON", .start = DA9055_IRQ_HWMON, .end = DA9055_IRQ_HWMON, .flags = IORESOURCE_IRQ, }; -static struct resource da9055_ld05_6_resource = { +static const struct resource da9055_ld05_6_resource = { .name = "REGULATOR", .start = DA9055_IRQ_REGULATOR, .end = DA9055_IRQ_REGULATOR, -- cgit