summaryrefslogtreecommitdiffstats
path: root/include/linux/irqdomain.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-01-26 12:12:14 -0700
committerGrant Likely <grant.likely@secretlab.ca>2012-02-16 06:11:24 -0700
commita18dc81bf58258ac0920bec26b91656cb0140d2a (patch)
tree7e11dd40b11ffa281c3ecb902994b94250fbf916 /include/linux/irqdomain.h
parent16b2e6e2f31dda41f114aa0acade04f7e10f67c9 (diff)
downloadop-kernel-dev-a18dc81bf58258ac0920bec26b91656cb0140d2a.zip
op-kernel-dev-a18dc81bf58258ac0920bec26b91656cb0140d2a.tar.gz
irq_domain: constify irq_domain_ops
Make irq_domain_ops pointer a constant to make it safer for multiple instances to share the same ops pointer and change the irq_domain code so that it does not modify the ops. v4: Fix mismatched type reference in powerpc code Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Milton Miller <miltonm@bga.com> Tested-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux/irqdomain.h')
-rw-r--r--include/linux/irqdomain.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index ea58f36..5245488 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -106,7 +106,7 @@ struct irq_domain {
} linear;
struct radix_tree_root tree;
} revmap_data;
- struct irq_domain_ops *ops;
+ const struct irq_domain_ops *ops;
void *host_data;
irq_hw_number_t inval_irq;
@@ -119,17 +119,17 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
unsigned int size,
unsigned int first_irq,
irq_hw_number_t first_hwirq,
- struct irq_domain_ops *ops,
+ const struct irq_domain_ops *ops,
void *host_data);
struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
unsigned int size,
- struct irq_domain_ops *ops,
+ const struct irq_domain_ops *ops,
void *host_data);
struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
- struct irq_domain_ops *ops,
+ const struct irq_domain_ops *ops,
void *host_data);
struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
- struct irq_domain_ops *ops,
+ const struct irq_domain_ops *ops,
void *host_data);
extern struct irq_domain *irq_find_host(struct device_node *node);
@@ -138,7 +138,7 @@ extern void irq_set_virq_count(unsigned int count);
static inline struct irq_domain *irq_domain_add_legacy_isa(
struct device_node *of_node,
- struct irq_domain_ops *ops,
+ const struct irq_domain_ops *ops,
void *host_data)
{
return irq_domain_add_legacy(of_node, NUM_ISA_INTERRUPTS, 0, 0, ops,
@@ -162,7 +162,7 @@ extern unsigned int irq_radix_revmap_lookup(struct irq_domain *host,
extern unsigned int irq_linear_revmap(struct irq_domain *host,
irq_hw_number_t hwirq);
-extern struct irq_domain_ops irq_domain_simple_ops;
+extern const struct irq_domain_ops irq_domain_simple_ops;
/* stock xlate functions */
int irq_domain_xlate_onecell(struct irq_domain *d, struct device_node *ctrlr,
OpenPOWER on IntegriCloud