Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: sun4i-gpadc: Constify static struct resource

Constify adc_resources[]. The only usage is to assign its address to the
resources field of the mfd_cell struct. This allows the compiler to put
it 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>

authored by

Rikard Falkeborn and committed by
Lee Jones
4bdcbbb9 8d7b3a6d

+1 -1
+1 -1
drivers/mfd/sun4i-gpadc.c
··· 18 18 #define ARCH_SUN5I_A13 1 19 19 #define ARCH_SUN6I_A31 2 20 20 21 - static struct resource adc_resources[] = { 21 + static const struct resource adc_resources[] = { 22 22 DEFINE_RES_IRQ_NAMED(SUN4I_GPADC_IRQ_FIFO_DATA, "FIFO_DATA_PENDING"), 23 23 DEFINE_RES_IRQ_NAMED(SUN4I_GPADC_IRQ_TEMP_DATA, "TEMP_DATA_PENDING"), 24 24 };