summaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 082dcbb4d3..317785429d 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -195,6 +195,11 @@ void disable_children(struct bus *bus);
bool dev_is_active_bridge(struct device *dev);
void add_more_links(struct device *dev, unsigned int total_links);
+static inline bool is_dev_enabled(const struct device *const dev)
+{
+ return dev && dev->enabled;
+}
+
/* Option ROM helper functions */
void run_bios(struct device *dev, unsigned long addr);