aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/devices/device_util.c4
-rw-r--r--src/include/device/device.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/devices/device_util.c b/src/devices/device_util.c
index 5cf5eabffd..224c58ee64 100644
--- a/src/devices/device_util.c
+++ b/src/devices/device_util.c
@@ -230,7 +230,9 @@ const char *dev_path(device_t dev)
const char *dev_name(device_t dev)
{
- if (dev->chip_ops && dev->chip_ops->name)
+ if (dev->name)
+ return dev->name;
+ else if (dev->chip_ops && dev->chip_ops->name)
return dev->chip_ops->name;
else
return "unknown";
diff --git a/src/include/device/device.h b/src/include/device/device.h
index ab5ab14ad4..329e3b7107 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -101,6 +101,7 @@ struct device {
struct device_operations *ops;
#ifndef __PRE_RAM__
const struct chip_operations *chip_ops;
+ const char *name;
#endif
ROMSTAGE_CONST void *chip_info;
};