mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
dm: core: Access device ofnode through functions
At present ofnode is present in the device even if it is never used. With of-platdata this field is not used, so can be removed. In preparation for this, change the access to go through inline functions. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -21,7 +21,7 @@ struct resource;
|
||||
#if CONFIG_IS_ENABLED(OF_LIVE)
|
||||
static inline const struct device_node *dev_np(const struct udevice *dev)
|
||||
{
|
||||
return ofnode_to_np(dev->node);
|
||||
return ofnode_to_np(dev_ofnode(dev));
|
||||
}
|
||||
#else
|
||||
static inline const struct device_node *dev_np(const struct udevice *dev)
|
||||
|
||||
Reference in New Issue
Block a user