mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
irqdomain: Fix irq_create_direct_mapping() to test irq_domain type.
irq_create_direct_mapping can only be used with the NOMAP type. Make the function test to ensure it is passed the correct type of irq_domain. Signed-off-by: Grant Likely <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Rob Herring <[email protected]>
This commit is contained in:
parent
d6b0d1f705
commit
9844a5524e
1 changed files with 2 additions and 2 deletions
|
|
@ -481,8 +481,8 @@ unsigned int irq_create_direct_mapping(struct irq_domain *domain)
|
|||
if (domain == NULL)
|
||||
domain = irq_default_domain;
|
||||
|
||||
BUG_ON(domain == NULL);
|
||||
WARN_ON(domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP);
|
||||
if (WARN_ON(!domain || domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP))
|
||||
return 0;
|
||||
|
||||
virq = irq_alloc_desc_from(1, of_node_to_nid(domain->of_node));
|
||||
if (!virq) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue