All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH 20/26] dm: core: Rename dev_has_of_node() to dev_has_ofnode()
Date: Sat, 19 Dec 2020 10:40:12 -0700	[thread overview]
Message-ID: <20201219174018.1114146-19-sjg@chromium.org> (raw)
In-Reply-To: <20201219174018.1114146-1-sjg@chromium.org>

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 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 ba50d46effe..8c7ce220f84 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 57d107aac32..f3da6af9090 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 4e474cbff73..4653e86ba46 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 17db5eb0609..ae6b1450d3a 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 a0c1752cddc..b15a14ec330 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.29.2.684.gfbc64c5ab5-goog

  parent reply	other threads:[~2020-12-19 17:40 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19 17:39 [PATCH 00/26] dm: Preparation for enhanced of-platdata (part C) Simon Glass
2020-12-19 17:39 ` Simon Glass
2020-12-19 17:39 ` [PATCH 01/26] sandbox: serial: Move priv into a header file Simon Glass
2020-12-21 11:38   ` Andy Shevchenko
2020-12-28 16:26   ` Simon Glass
2020-12-19 17:39 ` [PATCH 02/26] sandbox: i2c: " Simon Glass
2020-12-19 17:39 ` [PATCH 03/26] sandbox: Add a compatible string for spltest Simon Glass
2020-12-19 17:39 ` [PATCH 04/26] sandbox: Update dts files to reduce SPL size Simon Glass
2020-12-19 17:39 ` [PATCH 05/26] x86: apl: Move priv/plat structs to headers Simon Glass
2020-12-19 17:39 ` [PATCH 06/26] x86: Move priv/plat structs for intel_common " Simon Glass
2020-12-19 17:39 ` [PATCH 07/26] x86: spl: Move priv/plat structs " Simon Glass
2020-12-19 17:40 ` [PATCH 08/26] spi: Tidy up get/set of device node Simon Glass
2020-12-19 17:40 ` [PATCH 09/26] spi: Tweak a few strange SPI NOR features for of-platdata Simon Glass
2020-12-19 17:40 ` [PATCH 10/26] x86: apl: Use struct spi_nor instead of struct spi_flash Simon Glass
2020-12-19 17:40 ` [PATCH 11/26] dm: core: Move priv/plat structs for simple_bus to headers Simon Glass
2020-12-19 17:40 ` [PATCH 12/26] x86: sysreset: Move priv/plat structs " Simon Glass
2020-12-21 11:38   ` Andy Shevchenko
2020-12-28 16:26   ` Simon Glass
2020-12-19 17:40 ` [PATCH 13/26] x86: apl: Adjust how the UART gets its platform data Simon Glass
2020-12-19 17:40 ` [PATCH 14/26] x86: coral: Remove unwanted nodes from SPL/TPL Simon Glass
2020-12-19 17:40 ` [PATCH 15/26] x86: Drop rtc from SPL Simon Glass
2020-12-19 17:40 ` [PATCH 16/26] dm: core: Split out alloc code into a new function Simon Glass
2020-12-19 17:40 ` [PATCH 17/26] dm: core: Rename sqq to seq_ Simon Glass
2020-12-21 11:41   ` Andy Shevchenko
2020-12-28 16:26   ` Simon Glass
2020-12-19 17:40 ` [PATCH 18/26] dm: core: Access device flags through functions Simon Glass
2020-12-19 17:40 ` [PATCH 19/26] dm: core: Rename device flags to indicate it is private Simon Glass
2020-12-19 17:40 ` Simon Glass [this message]
2020-12-19 17:40 ` [PATCH 21/26] dm: core: Use dev_has_ofnode() instead of dev_of_valid() Simon Glass
2020-12-21 11:41   ` Andy Shevchenko
2020-12-28 16:26   ` Simon Glass
2021-01-04 11:01   ` Patrick DELAUNAY
2020-12-19 17:40 ` [PATCH 22/26] dm: core: Access device ofnode through functions Simon Glass
2020-12-19 17:40   ` Simon Glass
2021-01-04 13:02   ` Patrick DELAUNAY
2021-01-04 13:02     ` Patrick DELAUNAY
2021-01-07 12:36     ` Simon Glass
2021-01-07 12:36       ` Simon Glass
2020-12-19 17:40 ` [PATCH 23/26] dm: core: Rename device node to indicate it is private Simon Glass
2020-12-19 17:40 ` [PATCH 24/26] dm: core: Split out scanning code to dm_scan() Simon Glass
2020-12-19 17:40 ` [PATCH 25/26] dm: core: Allow the uclass list to move Simon Glass
2020-12-19 17:40 ` [PATCH 26/26] dm: core: Add logging when lists_bind_fdt() fails Simon Glass
2020-12-28 16:26 ` [PATCH 25/26] dm: core: Allow the uclass list to move Simon Glass
2020-12-28 16:26 ` [PATCH 26/26] dm: core: Add logging when lists_bind_fdt() fails Simon Glass
2020-12-28 16:26 ` [PATCH 24/26] dm: core: Split out scanning code to dm_scan() Simon Glass
2020-12-28 16:26 ` [PATCH 23/26] dm: core: Rename device node to indicate it is private Simon Glass
2020-12-28 16:26 ` [PATCH 22/26] dm: core: Access device ofnode through functions Simon Glass
2020-12-28 16:26   ` Simon Glass
2020-12-28 16:26 ` [PATCH 20/26] dm: core: Rename dev_has_of_node() to dev_has_ofnode() Simon Glass
2020-12-28 16:26 ` [PATCH 19/26] dm: core: Rename device flags to indicate it is private Simon Glass
2020-12-28 16:26 ` [PATCH 18/26] dm: core: Access device flags through functions Simon Glass
2020-12-28 16:26 ` [PATCH 16/26] dm: core: Split out alloc code into a new function Simon Glass
2020-12-28 16:26 ` [PATCH 15/26] x86: Drop rtc from SPL Simon Glass
2020-12-28 16:26 ` [PATCH 14/26] x86: coral: Remove unwanted nodes from SPL/TPL Simon Glass
2020-12-28 16:26 ` [PATCH 13/26] x86: apl: Adjust how the UART gets its platform data Simon Glass
2020-12-28 16:26 ` [PATCH 11/26] dm: core: Move priv/plat structs for simple_bus to headers Simon Glass
2020-12-28 16:26 ` [PATCH 09/26] spi: Tweak a few strange SPI NOR features for of-platdata Simon Glass
2020-12-28 16:26 ` [PATCH 10/26] x86: apl: Use struct spi_nor instead of struct spi_flash Simon Glass
2020-12-28 16:26 ` [PATCH 08/26] spi: Tidy up get/set of device node Simon Glass
2020-12-28 16:26 ` [PATCH 07/26] x86: spl: Move priv/plat structs to headers Simon Glass
2020-12-28 16:26 ` [PATCH 06/26] x86: Move priv/plat structs for intel_common " Simon Glass
2020-12-28 16:26 ` [PATCH 05/26] x86: apl: Move priv/plat structs " Simon Glass
2020-12-28 16:26 ` [PATCH 04/26] sandbox: Update dts files to reduce SPL size Simon Glass
2020-12-28 16:26 ` [PATCH 03/26] sandbox: Add a compatible string for spltest Simon Glass
2020-12-28 16:26 ` [PATCH 02/26] sandbox: i2c: Move priv into a header file Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201219174018.1114146-19-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.