diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2020-09-22 21:26:59 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2020-11-19 08:34:21 +0000 |
commit | c4a164f41554d2899bed94bdcc499263f41787b4 (patch) | |
tree | 5eeb68abc08e23d73be687265fb9f7064e7aee25 /drivers/mfd/max8925-core.c | |
parent | 4bdcbbb9a3a840a4b8105fd971dda319389a593f (diff) | |
download | linux-stable-c4a164f41554d2899bed94bdcc499263f41787b4.tar.gz linux-stable-c4a164f41554d2899bed94bdcc499263f41787b4.tar.bz2 linux-stable-c4a164f41554d2899bed94bdcc499263f41787b4.zip |
mfd: Constify static struct resources
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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/max8925-core.c')
-rw-r--r-- | drivers/mfd/max8925-core.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c index 0af6833b4080..eb3f061c8ee6 100644 --- a/drivers/mfd/max8925-core.c +++ b/drivers/mfd/max8925-core.c @@ -19,7 +19,7 @@ #include <linux/of.h> #include <linux/of_platform.h> -static struct resource bk_resources[] = { +static const struct resource bk_resources[] = { { 0x84, 0x84, "mode control", IORESOURCE_REG, }, { 0x85, 0x85, "control", IORESOURCE_REG, }, }; @@ -33,7 +33,7 @@ static struct mfd_cell bk_devs[] = { }, }; -static struct resource touch_resources[] = { +static const struct resource touch_resources[] = { { .name = "max8925-tsc", .start = MAX8925_TSC_IRQ, @@ -51,7 +51,7 @@ static const struct mfd_cell touch_devs[] = { }, }; -static struct resource power_supply_resources[] = { +static const struct resource power_supply_resources[] = { { .name = "max8925-power", .start = MAX8925_CHG_IRQ1, @@ -69,7 +69,7 @@ static const struct mfd_cell power_devs[] = { }, }; -static struct resource rtc_resources[] = { +static const struct resource rtc_resources[] = { { .name = "max8925-rtc", .start = MAX8925_IRQ_RTC_ALARM0, @@ -87,7 +87,7 @@ static const struct mfd_cell rtc_devs[] = { }, }; -static struct resource onkey_resources[] = { +static const struct resource onkey_resources[] = { { .name = "max8925-onkey", .start = MAX8925_IRQ_GPM_SW_R, @@ -110,95 +110,95 @@ static const struct mfd_cell onkey_devs[] = { }, }; -static struct resource sd1_resources[] = { +static const struct resource sd1_resources[] = { {0x06, 0x06, "sdv", IORESOURCE_REG, }, }; -static struct resource sd2_resources[] = { +static const struct resource sd2_resources[] = { {0x09, 0x09, "sdv", IORESOURCE_REG, }, }; -static struct resource sd3_resources[] = { +static const struct resource sd3_resources[] = { {0x0c, 0x0c, "sdv", IORESOURCE_REG, }, }; -static struct resource ldo1_resources[] = { +static const struct resource ldo1_resources[] = { {0x1a, 0x1a, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo2_resources[] = { +static const struct resource ldo2_resources[] = { {0x1e, 0x1e, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo3_resources[] = { +static const struct resource ldo3_resources[] = { {0x22, 0x22, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo4_resources[] = { +static const struct resource ldo4_resources[] = { {0x26, 0x26, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo5_resources[] = { +static const struct resource ldo5_resources[] = { {0x2a, 0x2a, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo6_resources[] = { +static const struct resource ldo6_resources[] = { {0x2e, 0x2e, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo7_resources[] = { +static const struct resource ldo7_resources[] = { {0x32, 0x32, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo8_resources[] = { +static const struct resource ldo8_resources[] = { {0x36, 0x36, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo9_resources[] = { +static const struct resource ldo9_resources[] = { {0x3a, 0x3a, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo10_resources[] = { +static const struct resource ldo10_resources[] = { {0x3e, 0x3e, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo11_resources[] = { +static const struct resource ldo11_resources[] = { {0x42, 0x42, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo12_resources[] = { +static const struct resource ldo12_resources[] = { {0x46, 0x46, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo13_resources[] = { +static const struct resource ldo13_resources[] = { {0x4a, 0x4a, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo14_resources[] = { +static const struct resource ldo14_resources[] = { {0x4e, 0x4e, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo15_resources[] = { +static const struct resource ldo15_resources[] = { {0x52, 0x52, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo16_resources[] = { +static const struct resource ldo16_resources[] = { {0x12, 0x12, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo17_resources[] = { +static const struct resource ldo17_resources[] = { {0x16, 0x16, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo18_resources[] = { +static const struct resource ldo18_resources[] = { {0x74, 0x74, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo19_resources[] = { +static const struct resource ldo19_resources[] = { {0x5e, 0x5e, "ldov", IORESOURCE_REG, }, }; -static struct resource ldo20_resources[] = { +static const struct resource ldo20_resources[] = { {0x9e, 0x9e, "ldov", IORESOURCE_REG, }, }; |