[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220207221314.97788-1-rikard.falkeborn@gmail.com>
Date: Mon, 7 Feb 2022 23:13:14 +0100
From: Rikard Falkeborn <rikard.falkeborn@...il.com>
To: Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>
Cc: Marc Zyngier <maz@...nel.org>, linux-sh@...r.kernel.org,
linux-kernel@...r.kernel.org,
Rikard Falkeborn <rikard.falkeborn@...il.com>
Subject: [PATCH] sh: mach-x3proto: Constify static irq_domain_ops
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@...il.com>
---
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
Powered by blists - more mailing lists