[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1483363905-2806-9-git-send-email-hanjun.guo@linaro.org>
Date: Mon, 2 Jan 2017 21:31:39 +0800
From: Hanjun Guo <hanjun.guo@...aro.org>
To: Marc Zyngier <marc.zyngier@....com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Cc: linux-acpi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linuxarm@...wei.com,
Thomas Gleixner <tglx@...utronix.de>,
Greg KH <gregkh@...uxfoundation.org>,
Tomasz Nowicki <tn@...ihalf.com>, Ma Jun <majun258@...wei.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Agustin Vega-Frias <agustinv@...eaurora.org>,
Sinan Kaya <okaya@...eaurora.org>,
charles.garcia-tobin@....com, huxinwei@...wei.com,
yimin@...wei.com, Jon Masters <jcm@...hat.com>,
Hanjun Guo <hanjun.guo@...aro.org>
Subject: [PATCH v6 08/14] ACPI: ARM64: IORT: rework iort_node_get_id()
iort_node_get_id() has two output, one is the mapped ids,
the other is the referenced parent node which is returned
from the function.
For now we need a API just return its parent node for
single mapping, so just update this function slightly then
reuse it later.
Signed-off-by: Hanjun Guo <hanjun.guo@...aro.org>
Tested-by: Majun <majun258@...wei.com>
Tested-by: Xinwei Kong <kong.kongxinwei@...ilicon.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Cc: Marc Zyngier <marc.zyngier@....com>
---
drivers/acpi/arm64/iort.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index ab7bae7..bc68d93 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -347,7 +347,8 @@ struct acpi_iort_node *iort_node_get_id(struct acpi_iort_node *node,
if (map[index].flags & ACPI_IORT_ID_SINGLE_MAPPING) {
if (node->type == ACPI_IORT_NODE_NAMED_COMPONENT ||
node->type == ACPI_IORT_NODE_PCI_ROOT_COMPLEX) {
- *id_out = map[index].output_base;
+ if (id_out)
+ *id_out = map[index].output_base;
return parent;
}
}
--
1.9.1
Powered by blists - more mailing lists