Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d4c9bc7 authored by Marc Zyngier's avatar Marc Zyngier Committed by Thomas Gleixner
Browse files

irqdomain: Use irq_domain_get_of_node() instead of direct field access



The struct irq_domain contains a "struct device_node *" field
(of_node) that is almost the only link between the irqdomain
and the device tree infrastructure.

In order to prepare for the removal of that field, convert all
users to use irq_domain_get_of_node() instead.

Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Reviewed-and-tested-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
Tested-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Graeme Gregory <graeme@xora.org.uk>
Cc: Jake Oshins <jakeo@microsoft.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Link: http://lkml.kernel.org/r/1444737105-31573-2-git-send-email-marc.zyngier@arm.com


Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e50226b4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ static int exynos_pmu_domain_xlate(struct irq_domain *domain,
				   unsigned long *out_hwirq,
				   unsigned int *out_type)
{
	if (domain->of_node != controller)
	if (irq_domain_get_of_node(domain) != controller)
		return -EINVAL;	/* Shouldn't happen, really... */
	if (intsize != 3)
		return -EINVAL;	/* Not GIC compliant */
@@ -217,7 +217,7 @@ static int exynos_pmu_domain_alloc(struct irq_domain *domain,
					      &exynos_pmu_chip, NULL);

	parent_args = *args;
	parent_args.np = domain->parent->of_node;
	parent_args.np = irq_domain_get_of_node(domain->parent);
	return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &parent_args);
}

+2 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ static int imx_gpc_domain_xlate(struct irq_domain *domain,
				unsigned long *out_hwirq,
				unsigned int *out_type)
{
	if (domain->of_node != controller)
	if (irq_domain_get_of_node(domain) != controller)
		return -EINVAL;	/* Shouldn't happen, really... */
	if (intsize != 3)
		return -EINVAL;	/* Not GIC compliant */
@@ -223,7 +223,7 @@ static int imx_gpc_domain_alloc(struct irq_domain *domain,
					      &imx_gpc_chip, NULL);

	parent_args = *args;
	parent_args.np = domain->parent->of_node;
	parent_args.np = irq_domain_get_of_node(domain->parent);
	return irq_domain_alloc_irqs_parent(domain, irq, nr_irqs, &parent_args);
}

+2 −2
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ static int wakeupgen_domain_xlate(struct irq_domain *domain,
				  unsigned long *out_hwirq,
				  unsigned int *out_type)
{
	if (domain->of_node != controller)
	if (irq_domain_get_of_node(domain) != controller)
		return -EINVAL;	/* Shouldn't happen, really... */
	if (intsize != 3)
		return -EINVAL;	/* Not GIC compliant */
@@ -441,7 +441,7 @@ static int wakeupgen_domain_alloc(struct irq_domain *domain,
					      &wakeupgen_chip, NULL);

	parent_args = *args;
	parent_args.np = domain->parent->of_node;
	parent_args.np = irq_domain_get_of_node(domain->parent);
	return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &parent_args);
}

+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ static void __init set_megamod_mux(struct megamod_pic *pic, int src, int output)
static void __init parse_priority_map(struct megamod_pic *pic,
				      int *mapping, int size)
{
	struct device_node *np = pic->irqhost->of_node;
	struct device_node *np = irq_domain_get_of_node(pic->irqhost);
	const __be32 *map;
	int i, maplen;
	u32 val;
+2 −2
Original line number Diff line number Diff line
@@ -1094,7 +1094,7 @@ static int octeon_irq_gpio_xlat(struct irq_domain *d,
	unsigned int pin;
	unsigned int trigger;

	if (d->of_node != node)
	if (irq_domain_get_of_node(d) != node)
		return -EINVAL;

	if (intsize < 2)
@@ -2163,7 +2163,7 @@ static int octeon_irq_cib_map(struct irq_domain *d,

	if (hw >= host_data->max_bits) {
		pr_err("ERROR: %s mapping %u is to big!\n",
		       d->of_node->name, (unsigned)hw);
		       irq_domain_get_of_node(d)->name, (unsigned)hw);
		return -EINVAL;
	}

Loading