Thread (43 messages) 43 messages, 6 authors, 2017-01-02
STALE3438d
Revisions (3)
  1. v5 current
  2. v8 [diff vs current]
  3. v9 [diff vs current]

[PATCH v5 08/14] ACPI: ARM64: IORT: rework iort_node_get_id()

From: guohanjun@huawei.com (Hanjun Guo)
Date: 2016-12-22 05:43:31
Also in: linux-acpi, lkml
Subsystem: acpi, the rest · Maintainers: "Rafael J. Wysocki", Linus Torvalds

From: Hanjun Guo <redacted>

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 <redacted>
Cc: Lorenzo Pieralisi <redacted>
Cc: Marc Zyngier <redacted>
---
 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.7.12.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help