diff options
| author | Grant Likely <grant.likely@linaro.org> | 2013-09-15 11:55:53 -0400 |
|---|---|---|
| committer | Shawn Guo <shawn.guo@freescale.com> | 2014-05-16 04:19:12 -0400 |
| commit | 568f4b903fe1cfc8464c0ce51ad5882c7e227a0e (patch) | |
| tree | 24d585587f2b03729e3b452b8a6736932bb36a00 /kernel/irq | |
| parent | d6e82b145aec027e127aa36527ae98714dab38ef (diff) | |
ENGR00313685-3 of/irq: simplify args to irq_create_of_mapping
commit e6d30ab1e7d1281784672c0fc2ffa385cfb7279e upstream.
All the callers of irq_create_of_mapping() pass the contents of a struct
of_phandle_args structure to the function. Since all the callers already
have an of_phandle_args pointer, why not pass it directly to
irq_create_of_mapping()?
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
arch/arm/mach-integrator/pci_v3.c
arch/mips/pci/pci-rt3883.c
kernel/irq/irqdomain.c
Diffstat (limited to 'kernel/irq')
| -rw-r--r-- | kernel/irq/irqdomain.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 54a4d5223238..16d5dfb0e336 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
| @@ -655,15 +655,14 @@ int irq_create_strict_mappings(struct irq_domain *domain, unsigned int irq_base, | |||
| 655 | } | 655 | } |
| 656 | EXPORT_SYMBOL_GPL(irq_create_strict_mappings); | 656 | EXPORT_SYMBOL_GPL(irq_create_strict_mappings); |
| 657 | 657 | ||
| 658 | unsigned int irq_create_of_mapping(struct device_node *controller, | 658 | unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data) |
| 659 | const u32 *intspec, unsigned int intsize) | ||
| 660 | { | 659 | { |
| 661 | struct irq_domain *domain; | 660 | struct irq_domain *domain; |
| 662 | irq_hw_number_t hwirq; | 661 | irq_hw_number_t hwirq; |
| 663 | unsigned int type = IRQ_TYPE_NONE; | 662 | unsigned int type = IRQ_TYPE_NONE; |
| 664 | unsigned int virq; | 663 | unsigned int virq; |
| 665 | 664 | ||
| 666 | domain = controller ? irq_find_host(controller) : irq_default_domain; | 665 | domain = irq_data->np ? irq_find_host(irq_data->np) : irq_default_domain; |
| 667 | if (!domain) { | 666 | if (!domain) { |
| 668 | #ifdef CONFIG_MIPS | 667 | #ifdef CONFIG_MIPS |
| 669 | /* | 668 | /* |
| @@ -678,16 +677,16 @@ unsigned int irq_create_of_mapping(struct device_node *controller, | |||
| 678 | return intspec[0]; | 677 | return intspec[0]; |
| 679 | #endif | 678 | #endif |
| 680 | pr_warning("no irq domain found for %s !\n", | 679 | pr_warning("no irq domain found for %s !\n", |
| 681 | of_node_full_name(controller)); | 680 | of_node_full_name(irq_data->np)); |
| 682 | return 0; | 681 | return 0; |
| 683 | } | 682 | } |
| 684 | 683 | ||
| 685 | /* If domain has no translation, then we assume interrupt line */ | 684 | /* If domain has no translation, then we assume interrupt line */ |
| 686 | if (domain->ops->xlate == NULL) | 685 | if (domain->ops->xlate == NULL) |
| 687 | hwirq = intspec[0]; | 686 | hwirq = irq_data->args[0]; |
| 688 | else { | 687 | else { |
| 689 | if (domain->ops->xlate(domain, controller, intspec, intsize, | 688 | if (domain->ops->xlate(domain, irq_data->np, irq_data->args, |
| 690 | &hwirq, &type)) | 689 | irq_data->args_count, &hwirq, &type)) |
| 691 | return 0; | 690 | return 0; |
| 692 | } | 691 | } |
| 693 | 692 | ||
