summaryrefslogtreecommitdiff
path: root/drivers/mfd/da9063-core.c
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-09-22 21:26:52 +0200
committerLee Jones <lee.jones@linaro.org>2020-11-19 08:34:21 +0000
commita0fa0abeb508360bea82a84ce83aea49769641d3 (patch)
treeba35f9cd055d9e3ca5de75decd26b4bb57ece7ea /drivers/mfd/da9063-core.c
parentf8d86e2998e91d5a9f62b4934445d1ecadd00b30 (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/da9063-core.c')
-rw-r--r--drivers/mfd/da9063-core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c
index a353d52210a9..df407c3afce3 100644
--- a/drivers/mfd/da9063-core.c
+++ b/drivers/mfd/da9063-core.c
@@ -29,7 +29,7 @@
#include <linux/uaccess.h>
-static struct resource da9063_regulators_resources[] = {
+static const struct resource da9063_regulators_resources[] = {
{
.name = "LDO_LIM",
.start = DA9063_IRQ_LDO_LIM,
@@ -38,7 +38,7 @@ static struct resource da9063_regulators_resources[] = {
},
};
-static struct resource da9063_rtc_resources[] = {
+static const struct resource da9063_rtc_resources[] = {
{
.name = "ALARM",
.start = DA9063_IRQ_ALARM,
@@ -53,7 +53,7 @@ static struct resource da9063_rtc_resources[] = {
}
};
-static struct resource da9063_onkey_resources[] = {
+static const struct resource da9063_onkey_resources[] = {
{
.name = "ONKEY",
.start = DA9063_IRQ_ONKEY,
@@ -62,7 +62,7 @@ static struct resource da9063_onkey_resources[] = {
},
};
-static struct resource da9063_hwmon_resources[] = {
+static const struct resource da9063_hwmon_resources[] = {
{
.start = DA9063_IRQ_ADC_RDY,
.end = DA9063_IRQ_ADC_RDY,