summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2013-09-15 16:39:11 +0100
committerGrant Likely <grant.likely@linaro.org>2013-10-24 11:42:51 +0100
commit530210c7814e83564c7ca7bca8192515042c0b63 (patch)
tree09549bc731f9397cc6a533e091a47d116d5653b5 /drivers/of
parent0c02c8007ea5554d028f99fd3e29fc201fdeeab3 (diff)
downloadlinux-530210c7814e83564c7ca7bca8192515042c0b63.tar.gz
linux-530210c7814e83564c7ca7bca8192515042c0b63.tar.bz2
linux-530210c7814e83564c7ca7bca8192515042c0b63.zip
of/irq: Replace of_irq with of_phandle_args
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>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/irq.c15
-rw-r--r--drivers/of/of_pci_irq.c2
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 410aa2415f42..a7db38a63403 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -36,13 +36,12 @@
*/
unsigned int irq_of_parse_and_map(struct device_node *dev, int index)
{
- struct of_irq oirq;
+ struct of_phandle_args oirq;
if (of_irq_parse_one(dev, index, &oirq))
return 0;
- return irq_create_of_mapping(oirq.controller, oirq.specifier,
- oirq.size);
+ return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
}
EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
@@ -94,7 +93,7 @@ struct device_node *of_irq_find_parent(struct device_node *child)
* node exist for the parent.
*/
int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec,
- u32 ointsize, const __be32 *addr, struct of_irq *out_irq)
+ u32 ointsize, const __be32 *addr, struct of_phandle_args *out_irq)
{
struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL;
const __be32 *tmp, *imap, *imask;
@@ -156,10 +155,10 @@ int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec,
NULL) {
pr_debug(" -> got it !\n");
for (i = 0; i < intsize; i++)
- out_irq->specifier[i] =
+ out_irq->args[i] =
of_read_number(intspec +i, 1);
- out_irq->size = intsize;
- out_irq->controller = ipar;
+ out_irq->args_count = intsize;
+ out_irq->np = ipar;
of_node_put(old);
return 0;
}
@@ -280,7 +279,7 @@ EXPORT_SYMBOL_GPL(of_irq_parse_raw);
* This function resolves an interrupt, walking the tree, for a given
* device-tree node. It's the high level pendant to of_irq_parse_raw().
*/
-int of_irq_parse_one(struct device_node *device, int index, struct of_irq *out_irq)
+int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_args *out_irq)
{
struct device_node *p;
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 @@
* PCI tree until an device-node is found, at which point it will finish
* resolving using the OF tree walking.
*/
-int of_irq_parse_pci(const struct pci_dev *pdev, struct of_irq *out_irq)
+int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq)
{
struct device_node *dn, *ppnode;
struct pci_dev *ppdev;