MIPS: ath25: Constify static irq_domain_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Mon, 7 Feb 2022 21:18:15 +0000 (22:18 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 22 Feb 2022 08:39:03 +0000 (09:39 +0100)
The only usage of these structs is to pass their address to either
irq_domain_add_tree() or irq_domain_create_linear(), both which takes
pointers to const struct irq_domain_ops. Make them const to allow the
compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/ath25/ar2315.c
arch/mips/ath25/ar5312.c

index 76e43a7..8ccf167 100644 (file)
@@ -112,7 +112,7 @@ static int ar2315_misc_irq_map(struct irq_domain *d, unsigned irq,
        return 0;
 }
 
-static struct irq_domain_ops ar2315_misc_irq_domain_ops = {
+static const struct irq_domain_ops ar2315_misc_irq_domain_ops = {
        .map = ar2315_misc_irq_map,
 };
 
index 822b639..cfa1035 100644 (file)
@@ -116,7 +116,7 @@ static int ar5312_misc_irq_map(struct irq_domain *d, unsigned irq,
        return 0;
 }
 
-static struct irq_domain_ops ar5312_misc_irq_domain_ops = {
+static const struct irq_domain_ops ar5312_misc_irq_domain_ops = {
        .map = ar5312_misc_irq_map,
 };