Message ID | 20220207221314.97788-1-rikard.falkeborn@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sh: mach-x3proto: Constify static irq_domain_ops | expand |
diff --git a/arch/sh/boards/mach-x3proto/gpio.c b/arch/sh/boards/mach-x3proto/gpio.c index f82d3a6a844a..dd8ef41e5562 100644 --- a/arch/sh/boards/mach-x3proto/gpio.c +++ b/arch/sh/boards/mach-x3proto/gpio.c @@ -91,7 +91,7 @@ static int x3proto_gpio_irq_map(struct irq_domain *domain, unsigned int virq, return 0; } -static struct irq_domain_ops x3proto_gpio_irq_ops = { +static const struct irq_domain_ops x3proto_gpio_irq_ops = { .map = x3proto_gpio_irq_map, .xlate = irq_domain_xlate_twocell, };
The only usage of x3proto_gpio_irq_ops is to pass its address to irq_domain_add_linear() which takes a pointer to const struct irq_domain_ops. Make it const to allow the compiler to put it in read-only memory Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> --- arch/sh/boards/mach-x3proto/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)