diff options
author | Grant Likely <grant.likely@linaro.org> | 2013-09-15 11:39:11 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@freescale.com> | 2014-05-16 04:19:12 -0400 |
commit | d6e82b145aec027e127aa36527ae98714dab38ef (patch) | |
tree | 31c19c56b0e9c49e6da4260a2ef2ded2c263768c /drivers/of | |
parent | efc5383516e7c4d9ddeebab3eb3601467d7eb8f8 (diff) |
ENGR00313685-2 of/irq: Replace of_irq with of_phandle_args
commit 530210c7814e83564c7ca7bca8192515042c0b63 upstream.
struct of_irq and struct of_phandle_args are exactly the same structure.
This patch makes the kernel use of_phandle_args everywhere. This in
itself isn't a big deal, but it makes some follow-on patches simpler.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Tony Lindgren <tony@atomide.com>
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
include/linux/of_irq.h
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/irq.c | 15 | ||||
-rw-r--r-- | drivers/of/of_pci_irq.c | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 6dacacf22df4..6839bda3ce3c 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
@@ -36,13 +36,12 @@ | |||
36 | */ | 36 | */ |
37 | unsigned int irq_of_parse_and_map(struct device_node *dev, int index) | 37 | unsigned int irq_of_parse_and_map(struct device_node *dev, int index) |
38 | { | 38 | { |
39 | struct of_irq oirq; | 39 | struct of_phandle_args oirq; |
40 | 40 | ||
41 | if (of_irq_parse_one(dev, index, &oirq)) | 41 | if (of_irq_parse_one(dev, index, &oirq)) |
42 | return 0; | 42 | return 0; |
43 | 43 | ||
44 | return irq_create_of_mapping(oirq.controller, oirq.specifier, | 44 | return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); |
45 | oirq.size); | ||
46 | } | 45 | } |
47 | EXPORT_SYMBOL_GPL(irq_of_parse_and_map); | 46 | EXPORT_SYMBOL_GPL(irq_of_parse_and_map); |
48 | 47 | ||
@@ -94,7 +93,7 @@ struct device_node *of_irq_find_parent(struct device_node *child) | |||
94 | * node exist for the parent. | 93 | * node exist for the parent. |
95 | */ | 94 | */ |
96 | int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec, | 95 | int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec, |
97 | u32 ointsize, const __be32 *addr, struct of_irq *out_irq) | 96 | u32 ointsize, const __be32 *addr, struct of_phandle_args *out_irq) |
98 | { | 97 | { |
99 | struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL; | 98 | struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL; |
100 | const __be32 *tmp, *imap, *imask; | 99 | const __be32 *tmp, *imap, *imask; |
@@ -156,10 +155,10 @@ int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec, | |||
156 | NULL) { | 155 | NULL) { |
157 | pr_debug(" -> got it !\n"); | 156 | pr_debug(" -> got it !\n"); |
158 | for (i = 0; i < intsize; i++) | 157 | for (i = 0; i < intsize; i++) |
159 | out_irq->specifier[i] = | 158 | out_irq->args[i] = |
160 | of_read_number(intspec +i, 1); | 159 | of_read_number(intspec +i, 1); |
161 | out_irq->size = intsize; | 160 | out_irq->args_count = intsize; |
162 | out_irq->controller = ipar; | 161 | out_irq->np = ipar; |
163 | of_node_put(old); | 162 | of_node_put(old); |
164 | return 0; | 163 | return 0; |
165 | } | 164 | } |
@@ -280,7 +279,7 @@ EXPORT_SYMBOL_GPL(of_irq_parse_raw); | |||
280 | * This function resolves an interrupt, walking the tree, for a given | 279 | * This function resolves an interrupt, walking the tree, for a given |
281 | * device-tree node. It's the high level pendant to of_irq_parse_raw(). | 280 | * device-tree node. It's the high level pendant to of_irq_parse_raw(). |
282 | */ | 281 | */ |
283 | int of_irq_parse_one(struct device_node *device, int index, struct of_irq *out_irq) | 282 | int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_args *out_irq) |
284 | { | 283 | { |
285 | struct device_node *p; | 284 | struct device_node *p; |
286 | const __be32 *intspec, *tmp, *addr; | 285 | const __be32 *intspec, *tmp, *addr; |
diff --git a/drivers/of/of_pci_irq.c b/drivers/of/of_pci_irq.c index dceec1048dab..ee3293d4b66b 100644 --- a/drivers/of/of_pci_irq.c +++ b/drivers/of/of_pci_irq.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * PCI tree until an device-node is found, at which point it will finish | 15 | * PCI tree until an device-node is found, at which point it will finish |
16 | * resolving using the OF tree walking. | 16 | * resolving using the OF tree walking. |
17 | */ | 17 | */ |
18 | int of_irq_parse_pci(const struct pci_dev *pdev, struct of_irq *out_irq) | 18 | int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq) |
19 | { | 19 | { |
20 | struct device_node *dn, *ppnode; | 20 | struct device_node *dn, *ppnode; |
21 | struct pci_dev *ppdev; | 21 | struct pci_dev *ppdev; |