mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00: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:
parent
7d14ee443c
commit
f10643cf8a
50 changed files with 113 additions and 82 deletions
|
@ -334,12 +334,12 @@ struct mtd_info {
|
|||
#if IS_ENABLED(CONFIG_DM)
|
||||
static inline void mtd_set_ofnode(struct mtd_info *mtd, ofnode node)
|
||||
{
|
||||
mtd->dev->node = node;
|
||||
dev_set_ofnode(mtd->dev, node);
|
||||
}
|
||||
|
||||
static inline const ofnode mtd_get_ofnode(struct mtd_info *mtd)
|
||||
{
|
||||
return mtd->dev->node;
|
||||
return dev_ofnode(mtd->dev);
|
||||
}
|
||||
#else
|
||||
struct device_node;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue