mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
16b2e6e2f3
commit
a18dc81bf5
3 changed files with 23 additions and 24 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue