diff options
| -rw-r--r-- | kernel/irq/irqdomain.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index b1f774cfd089..d3968e91bfd2 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
| @@ -205,7 +205,8 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, | |||
| 205 | * one can then use irq_create_mapping() to | 205 | * one can then use irq_create_mapping() to |
| 206 | * explicitly change them | 206 | * explicitly change them |
| 207 | */ | 207 | */ |
| 208 | ops->map(domain, irq, hwirq); | 208 | if (ops->map) |
| 209 | ops->map(domain, irq, hwirq); | ||
| 209 | 210 | ||
| 210 | /* Clear norequest flags */ | 211 | /* Clear norequest flags */ |
| 211 | irq_clear_status_flags(irq, IRQ_NOREQUEST); | 212 | irq_clear_status_flags(irq, IRQ_NOREQUEST); |
| @@ -340,8 +341,8 @@ static int irq_setup_virq(struct irq_domain *domain, unsigned int virq, | |||
| 340 | 341 | ||
| 341 | irq_data->hwirq = hwirq; | 342 | irq_data->hwirq = hwirq; |
| 342 | irq_data->domain = domain; | 343 | irq_data->domain = domain; |
| 343 | if (domain->ops->map(domain, virq, hwirq)) { | 344 | if (domain->ops->map && domain->ops->map(domain, virq, hwirq)) { |
| 344 | pr_debug("irq-%i==>hwirq-0x%lx mapping failed\n", virq, hwirq); | 345 | pr_err("irq-%i==>hwirq-0x%lx mapping failed\n", virq, hwirq); |
| 345 | irq_data->domain = NULL; | 346 | irq_data->domain = NULL; |
| 346 | irq_data->hwirq = 0; | 347 | irq_data->hwirq = 0; |
| 347 | return -1; | 348 | return -1; |
| @@ -763,12 +764,6 @@ static int __init irq_debugfs_init(void) | |||
| 763 | __initcall(irq_debugfs_init); | 764 | __initcall(irq_debugfs_init); |
| 764 | #endif /* CONFIG_IRQ_DOMAIN_DEBUG */ | 765 | #endif /* CONFIG_IRQ_DOMAIN_DEBUG */ |
| 765 | 766 | ||
| 766 | static int irq_domain_simple_map(struct irq_domain *d, unsigned int irq, | ||
| 767 | irq_hw_number_t hwirq) | ||
| 768 | { | ||
| 769 | return 0; | ||
| 770 | } | ||
| 771 | |||
| 772 | /** | 767 | /** |
| 773 | * irq_domain_xlate_onecell() - Generic xlate for direct one cell bindings | 768 | * irq_domain_xlate_onecell() - Generic xlate for direct one cell bindings |
| 774 | * | 769 | * |
| @@ -831,7 +826,6 @@ int irq_domain_xlate_onetwocell(struct irq_domain *d, | |||
| 831 | EXPORT_SYMBOL_GPL(irq_domain_xlate_onetwocell); | 826 | EXPORT_SYMBOL_GPL(irq_domain_xlate_onetwocell); |
| 832 | 827 | ||
| 833 | const struct irq_domain_ops irq_domain_simple_ops = { | 828 | const struct irq_domain_ops irq_domain_simple_ops = { |
| 834 | .map = irq_domain_simple_map, | ||
| 835 | .xlate = irq_domain_xlate_onetwocell, | 829 | .xlate = irq_domain_xlate_onetwocell, |
| 836 | }; | 830 | }; |
| 837 | EXPORT_SYMBOL_GPL(irq_domain_simple_ops); | 831 | EXPORT_SYMBOL_GPL(irq_domain_simple_ops); |
