diff options
Diffstat (limited to 'src/devices/device_util.c')
-rw-r--r-- | src/devices/device_util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/devices/device_util.c b/src/devices/device_util.c index 6f088b2e84..5cf5eabffd 100644 --- a/src/devices/device_util.c +++ b/src/devices/device_util.c @@ -228,6 +228,14 @@ const char *dev_path(device_t dev) return buffer; } +const char *dev_name(device_t dev) +{ + if (dev->chip_ops && dev->chip_ops->name) + return dev->chip_ops->name; + else + return "unknown"; +} + const char *bus_path(struct bus *bus) { static char buffer[BUS_PATH_MAX]; |