mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-17 23:07:40 +07:00
genirq: Simplify irq_data_to_desc()
Avoid the lookup of irq_desc and use the same mechanism for hierarchical and flat irqdomains. Based-on-a-patch-from: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
123236ccac
commit
755d119a62
@ -98,11 +98,7 @@ extern struct irq_desc irq_desc[NR_IRQS];
|
|||||||
|
|
||||||
static inline struct irq_desc *irq_data_to_desc(struct irq_data *data)
|
static inline struct irq_desc *irq_data_to_desc(struct irq_data *data)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
|
return container_of(data->common, struct irq_desc, irq_common_data);
|
||||||
return irq_to_desc(data->irq);
|
|
||||||
#else
|
|
||||||
return container_of(data, struct irq_desc, irq_data);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int irq_desc_get_irq(struct irq_desc *desc)
|
static inline unsigned int irq_desc_get_irq(struct irq_desc *desc)
|
||||||
|
Loading…
Reference in New Issue
Block a user