summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/acpi_device.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c
index 940d87156d..f8f6a6dbe9 100644
--- a/src/arch/x86/acpi_device.c
+++ b/src/arch/x86/acpi_device.c
@@ -121,10 +121,15 @@ const char *acpi_device_path(struct device *dev)
/* Return the path of the parent device as the ACPI Scope for this device */
const char *acpi_device_scope(struct device *dev)
{
+ static char buf[DEVICE_PATH_MAX] = {};
+
if (!dev || !dev->bus || !dev->bus->dev)
return NULL;
- return acpi_device_path(dev->bus->dev);
+ if (acpi_device_path_fill(dev->bus->dev, buf, sizeof(buf), 0) <= 0)
+ return NULL;
+
+ return buf;
}
/* Concatentate the device path and provided name suffix */