summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/pcie/generic/chip.h1
-rw-r--r--src/drivers/pcie/generic/generic.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/src/drivers/pcie/generic/chip.h b/src/drivers/pcie/generic/chip.h
index 1d9f0a62ed..e5b2876766 100644
--- a/src/drivers/pcie/generic/chip.h
+++ b/src/drivers/pcie/generic/chip.h
@@ -6,6 +6,7 @@
#include <types.h>
struct drivers_pcie_generic_config {
+ const char *name;
};
#endif /* _PCIE_GENERIC_H_ */
diff --git a/src/drivers/pcie/generic/generic.c b/src/drivers/pcie/generic/generic.c
index a8dd1d9745..a26c37b543 100644
--- a/src/drivers/pcie/generic/generic.c
+++ b/src/drivers/pcie/generic/generic.c
@@ -9,7 +9,12 @@
static const char *pcie_generic_acpi_name(const struct device *dev)
{
- return "DEV0";
+ struct drivers_pcie_generic_config *config = dev->chip_info;
+
+ if (!config || !config->name)
+ return "DEV0";
+
+ return config->name;
}
static void pcie_generic_fill_ssdt(const struct device *dev)