summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2017-04-13 17:06:16 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2017-04-17 22:53:14 +0200
commitaeb6101a78d0b75fc02a919281f341db64938185 (patch)
tree2a110527012689f698f42b446920c99cca6c6064 /src/arch/x86
parent7b58319e9c320426f7dee202bf9201b6628bf958 (diff)
downloadcoreboot-aeb6101a78d0b75fc02a919281f341db64938185.tar.xz
arch/x86/acpi: Allow "transparent" ACPI device names
Certain devices, such as the northbridge on AMD Opteron systems, do not require a node in the ACPI device path. Allow such devices to be passed over by the ACPI path generator if the device-specific ACPI name function returns a zero-length (non-NULL) string. Change-Id: Iffffc9a30b395b0bd6d60e411439a437e89f554e Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> Reviewed-on: https://review.coreboot.org/19281 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/acpi_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c
index f4f1c4c3b5..49439cc4a9 100644
--- a/src/arch/x86/acpi_device.c
+++ b/src/arch/x86/acpi_device.c
@@ -113,7 +113,9 @@ static size_t acpi_device_path_fill(struct device *dev, char *buf,
/* Fill in the path from the root device */
next += snprintf(buf + next, buf_len - next, "%s%s",
- dev->path.type == DEVICE_PATH_ROOT ? "" : ".", name);
+ (dev->path.type == DEVICE_PATH_ROOT
+ || (strlen(name) == 0)) ?
+ "" : ".", name);
return next;
}