diff options
Diffstat (limited to 'include/driver.h')
-rw-r--r-- | include/driver.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h index a787f985a0..85cb30f8b0 100644 --- a/include/driver.h +++ b/include/driver.h @@ -595,4 +595,12 @@ const void *device_get_match_data(struct device_d *dev); int device_match_of_modalias(struct device_d *dev, struct driver_d *drv); +struct device_d *device_find_child(struct device_d *parent, void *data, + int (*match)(struct device_d *dev, void *data)); + +static inline struct device_node *dev_of_node(struct device_d *dev) +{ + return IS_ENABLED(CONFIG_OFDEVICE) ? dev->device_node : NULL; +} + #endif /* DRIVER_H */ |