[PATCH] sh: mach-x3proto: Constify static irq_domain_ops

From: Rikard Falkeborn
Date: Mon Feb 07 2022 - 17:13:24 EST


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@xxxxxxxxx>
---
arch/sh/boards/mach-x3proto/gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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,
};
--
2.35.1