[PATCH v1 2/8] driver: add dev_is_probed() helper function
Oleksij Rempel
o.rempel at pengutronix.de
Mon Sep 26 01:17:34 PDT 2022
Add function to get device/driver probe state.
Signed-off-by: Oleksij Rempel <o.rempel at pengutronix.de>
---
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
More information about the barebox
mailing list