dm: core: Rename dev_has_of_node() to dev_has_ofnode()

We use 'ofnode' rather than 'of_node' in U-Boot. Rename this function to
fit.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2020-12-19 10:40:12 -07:00
parent 156004f863
commit c23405f817
5 changed files with 5 additions and 5 deletions

View File

@ -406,7 +406,7 @@ int device_of_to_plat(struct udevice *dev)
assert(drv); assert(drv);
if (drv->of_to_plat && if (drv->of_to_plat &&
(CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) { (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_ofnode(dev))) {
ret = drv->of_to_plat(dev); ret = drv->of_to_plat(dev);
if (ret) if (ret)
goto fail; goto fail;

View File

@ -3752,7 +3752,7 @@ static int octeontx_mmc_host_probe(struct udevice *dev)
host->dev = dev; host->dev = dev;
debug("%s(%s): Base address: %p\n", __func__, dev->name, debug("%s(%s): Base address: %p\n", __func__, dev->name,
host->base_addr); host->base_addr);
if (!dev_has_of_node(dev)) { if (!dev_has_ofnode(dev)) {
pr_err("%s: No device tree information found\n", __func__); pr_err("%s: No device tree information found\n", __func__);
return -1; return -1;
} }

View File

@ -305,7 +305,7 @@ int pinctrl_select_state(struct udevice *dev, const char *statename)
* Some device which is logical like mmc.blk, do not have * Some device which is logical like mmc.blk, do not have
* a valid ofnode. * a valid ofnode.
*/ */
if (!dev_has_of_node(dev)) if (!dev_has_ofnode(dev))
return 0; return 0;
/* /*
* Try full-implemented pinctrl first. * Try full-implemented pinctrl first.

View File

@ -517,7 +517,7 @@ static ofnode usb_get_ofnode(struct udevice *hub, int port)
ofnode node; ofnode node;
u32 reg; u32 reg;
if (!dev_has_of_node(hub)) if (!dev_has_ofnode(hub))
return ofnode_null(); return ofnode_null();
/* /*

View File

@ -200,7 +200,7 @@ static inline int dev_of_offset(const struct udevice *dev)
return ofnode_to_offset(dev->node); return ofnode_to_offset(dev->node);
} }
static inline bool dev_has_of_node(struct udevice *dev) static inline bool dev_has_ofnode(struct udevice *dev)
{ {
return ofnode_valid(dev->node); return ofnode_valid(dev->node);
} }