diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2012-01-26 14:12:14 -0500 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2012-02-16 08:11:24 -0500 |
| commit | a18dc81bf58258ac0920bec26b91656cb0140d2a (patch) | |
| tree | 7e11dd40b11ffa281c3ecb902994b94250fbf916 /include/linux | |
| parent | 16b2e6e2f31dda41f114aa0acade04f7e10f67c9 (diff) | |
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')
| -rw-r--r-- | include/linux/irqdomain.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index ea58f36688a0..52454881938a 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
| @@ -106,7 +106,7 @@ struct irq_domain { | |||
| 106 | } linear; | 106 | } linear; |
| 107 | struct radix_tree_root tree; | 107 | struct radix_tree_root tree; |
| 108 | } revmap_data; | 108 | } revmap_data; |
| 109 | struct irq_domain_ops *ops; | 109 | const struct irq_domain_ops *ops; |
| 110 | void *host_data; | 110 | void *host_data; |
| 111 | irq_hw_number_t inval_irq; | 111 | irq_hw_number_t inval_irq; |
| 112 | 112 | ||
| @@ -119,17 +119,17 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, | |||
| 119 | unsigned int size, | 119 | unsigned int size, |
| 120 | unsigned int first_irq, | 120 | unsigned int first_irq, |
| 121 | irq_hw_number_t first_hwirq, | 121 | irq_hw_number_t first_hwirq, |
| 122 | struct irq_domain_ops *ops, | 122 | const struct irq_domain_ops *ops, |
| 123 | void *host_data); | 123 | void *host_data); |
| 124 | struct irq_domain *irq_domain_add_linear(struct device_node *of_node, | 124 | struct irq_domain *irq_domain_add_linear(struct device_node *of_node, |
| 125 | unsigned int size, | 125 | unsigned int size, |
| 126 | struct irq_domain_ops *ops, | 126 | const struct irq_domain_ops *ops, |
| 127 | void *host_data); | 127 | void *host_data); |
| 128 | struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, | 128 | struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, |
| 129 | struct irq_domain_ops *ops, | 129 | const struct irq_domain_ops *ops, |
| 130 | void *host_data); | 130 | void *host_data); |
| 131 | struct irq_domain *irq_domain_add_tree(struct device_node *of_node, | 131 | struct irq_domain *irq_domain_add_tree(struct device_node *of_node, |
| 132 | struct irq_domain_ops *ops, | 132 | const struct irq_domain_ops *ops, |
| 133 | void *host_data); | 133 | void *host_data); |
| 134 | 134 | ||
| 135 | extern struct irq_domain *irq_find_host(struct device_node *node); | 135 | extern struct irq_domain *irq_find_host(struct device_node *node); |
| @@ -138,7 +138,7 @@ extern void irq_set_virq_count(unsigned int count); | |||
| 138 | 138 | ||
| 139 | static inline struct irq_domain *irq_domain_add_legacy_isa( | 139 | static inline struct irq_domain *irq_domain_add_legacy_isa( |
| 140 | struct device_node *of_node, | 140 | struct device_node *of_node, |
| 141 | struct irq_domain_ops *ops, | 141 | const struct irq_domain_ops *ops, |
| 142 | void *host_data) | 142 | void *host_data) |
| 143 | { | 143 | { |
| 144 | return irq_domain_add_legacy(of_node, NUM_ISA_INTERRUPTS, 0, 0, ops, | 144 | 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, | |||
| 162 | extern unsigned int irq_linear_revmap(struct irq_domain *host, | 162 | extern unsigned int irq_linear_revmap(struct irq_domain *host, |
| 163 | irq_hw_number_t hwirq); | 163 | irq_hw_number_t hwirq); |
| 164 | 164 | ||
| 165 | extern struct irq_domain_ops irq_domain_simple_ops; | 165 | extern const struct irq_domain_ops irq_domain_simple_ops; |
| 166 | 166 | ||
| 167 | /* stock xlate functions */ | 167 | /* stock xlate functions */ |
| 168 | int irq_domain_xlate_onecell(struct irq_domain *d, struct device_node *ctrlr, | 168 | int irq_domain_xlate_onecell(struct irq_domain *d, struct device_node *ctrlr, |
