summaryrefslogtreecommitdiff
path: root/include/dm/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dm/device.h')
-rw-r--r--include/dm/device.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 0a9718a5b81..fac99612086 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -181,7 +181,7 @@ struct udevice {
u32 flags_;
#endif
int seq_;
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
ofnode node_;
#endif
#ifdef CONFIG_DEVRES
@@ -242,7 +242,7 @@ static inline void dev_bic_flags(struct udevice *dev, u32 bic)
*/
static inline ofnode dev_ofnode(const struct udevice *dev)
{
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
return dev->node_;
#else
return ofnode_null();
@@ -262,7 +262,7 @@ static inline ofnode dev_ofnode(const struct udevice *dev)
static inline int dev_of_offset(const struct udevice *dev)
{
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
return ofnode_to_offset(dev_ofnode(dev));
#else
return -1;
@@ -271,7 +271,7 @@ static inline int dev_of_offset(const struct udevice *dev)
static inline bool dev_has_ofnode(const struct udevice *dev)
{
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
return ofnode_valid(dev_ofnode(dev));
#else
return false;
@@ -280,7 +280,7 @@ static inline bool dev_has_ofnode(const struct udevice *dev)
static inline void dev_set_ofnode(struct udevice *dev, ofnode node)
{
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
dev->node_ = node;
#endif
}
@@ -300,7 +300,7 @@ struct udevice_id {
ulong data;
};
-#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
#define of_match_ptr(_ptr) (_ptr)
#else
#define of_match_ptr(_ptr) NULL
@@ -738,7 +738,7 @@ int device_find_next_child(struct udevice **devp);
*
* @parent: Parent device to search
* @uclass_id: Uclass to look for
- * @devp: Returns device found, if any
+ * @devp: Returns device found, if any, else NULL
* @return 0 if found, else -ENODEV
*/
int device_find_first_inactive_child(const struct udevice *parent,
@@ -750,7 +750,7 @@ int device_find_first_inactive_child(const struct udevice *parent,
*
* @parent: Parent device to search
* @uclass_id: Uclass to look for
- * @devp: Returns first child device in that uclass, if any
+ * @devp: Returns first child device in that uclass, if any, else NULL
* @return 0 if found, else -ENODEV
*/
int device_find_first_child_by_uclass(const struct udevice *parent,