From c23405f8176c8d32d36ad992eb203ec87c4f5507 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 19 Dec 2020 10:40:12 -0700 Subject: [PATCH] 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 --- drivers/core/device.c | 2 +- drivers/mmc/octeontx_hsmmc.c | 2 +- drivers/pinctrl/pinctrl-uclass.c | 2 +- drivers/usb/host/usb-uclass.c | 2 +- include/dm/device.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/core/device.c b/drivers/core/device.c index ba50d46eff..8c7ce220f8 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -406,7 +406,7 @@ int device_of_to_plat(struct udevice *dev) assert(drv); 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); if (ret) goto fail; diff --git a/drivers/mmc/octeontx_hsmmc.c b/drivers/mmc/octeontx_hsmmc.c index 57d107aac3..f3da6af909 100644 --- a/drivers/mmc/octeontx_hsmmc.c +++ b/drivers/mmc/octeontx_hsmmc.c @@ -3752,7 +3752,7 @@ static int octeontx_mmc_host_probe(struct udevice *dev) host->dev = dev; debug("%s(%s): Base address: %p\n", __func__, dev->name, host->base_addr); - if (!dev_has_of_node(dev)) { + if (!dev_has_ofnode(dev)) { pr_err("%s: No device tree information found\n", __func__); return -1; } diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 4e474cbff7..4653e86ba4 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -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 * a valid ofnode. */ - if (!dev_has_of_node(dev)) + if (!dev_has_ofnode(dev)) return 0; /* * Try full-implemented pinctrl first. diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 17db5eb060..ae6b1450d3 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -517,7 +517,7 @@ static ofnode usb_get_ofnode(struct udevice *hub, int port) ofnode node; u32 reg; - if (!dev_has_of_node(hub)) + if (!dev_has_ofnode(hub)) return ofnode_null(); /* diff --git a/include/dm/device.h b/include/dm/device.h index a0c1752cdd..b15a14ec33 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -200,7 +200,7 @@ static inline int dev_of_offset(const struct udevice *dev) 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); } -- 2.39.5