diff options
Diffstat (limited to 'src/device/device_util.c')
-rw-r--r-- | src/device/device_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c index 809748465f..45dbccc28d 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -5,6 +5,7 @@ #include <device/path.h> #include <device/pci_def.h> #include <device/resource.h> +#include <stdbool.h> #include <stdlib.h> #include <string.h> @@ -939,6 +940,15 @@ const char *dev_path_name(enum device_path_type type) return type_name; } +bool dev_path_hotplug(const struct device *dev) +{ + for (dev = dev->bus->dev; dev != dev->bus->dev; dev = dev->bus->dev) { + if (dev->hotplug_port) + return true; + } + return false; +} + void log_resource(const char *type, const struct device *dev, const struct resource *res, const char *srcfile, const int line) { |