Add function to get device/driver probe state.

Signed-off-by: Oleksij Rempel <[email protected]>
---
 include/driver.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/driver.h b/include/driver.h
index 543287a276..f48e906fec 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -618,4 +618,9 @@ static inline void *dev_get_priv(struct device_d *dev)
        return dev->priv;
 }
 
+static inline bool dev_is_probed(struct device_d *dev)
+{
+       return dev->driver ? true : false;
+}
+
 #endif /* DRIVER_H */
-- 
2.30.2


Reply via email to