From c4a164f41554d2899bed94bdcc499263f41787b4 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Tue, 22 Sep 2020 21:26:59 +0200 Subject: 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 Signed-off-by: Lee Jones --- drivers/mfd/tc3589x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/mfd/tc3589x.c') diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index 7882a37ffc35..7614f8fe0e91 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -141,7 +141,7 @@ out: } EXPORT_SYMBOL_GPL(tc3589x_set_bits); -static struct resource gpio_resources[] = { +static const struct resource gpio_resources[] = { { .start = TC3589x_INT_GPIIRQ, .end = TC3589x_INT_GPIIRQ, @@ -149,7 +149,7 @@ static struct resource gpio_resources[] = { }, }; -static struct resource keypad_resources[] = { +static const struct resource keypad_resources[] = { { .start = TC3589x_INT_KBDIRQ, .end = TC3589x_INT_KBDIRQ, -- cgit v1.2.3-58-ga151