dm: core: Drop ofnode_is_available()

This function is also available as ofnode_is_enabled(), so use that
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/arm/mach-tegra/xusb-padctl-common.c b/arch/arm/mach-tegra/xusb-padctl-common.c
index 8bdd44a..388ec49 100644
--- a/arch/arm/mach-tegra/xusb-padctl-common.c
+++ b/arch/arm/mach-tegra/xusb-padctl-common.c
@@ -282,7 +282,7 @@
 	debug("%s: count=%d\n", __func__, count);
 	for (i = 0; i < count; i++) {
 		debug("%s: i=%d, node=%p\n", __func__, i, nodes[i].np);
-		if (!ofnode_is_available(nodes[i]))
+		if (!ofnode_is_enabled(nodes[i]))
 			continue;
 
 		padctl.socdata = socdata;
diff --git a/arch/riscv/lib/andes_plic.c b/arch/riscv/lib/andes_plic.c
index 5e113ee..6851475 100644
--- a/arch/riscv/lib/andes_plic.c
+++ b/arch/riscv/lib/andes_plic.c
@@ -71,7 +71,7 @@
 			continue;
 
 		/* skip if hart is marked as not available */
-		if (!ofnode_is_available(node))
+		if (!ofnode_is_enabled(node))
 			continue;
 
 		/* read hart ID of CPU */
diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c
index c0f65af..4f073a0 100644
--- a/arch/riscv/lib/smp.c
+++ b/arch/riscv/lib/smp.c
@@ -27,7 +27,7 @@
 
 	ofnode_for_each_subnode(node, cpus) {
 		/* skip if hart is marked as not available in the device tree */
-		if (!ofnode_is_available(node))
+		if (!ofnode_is_enabled(node))
 			continue;
 
 		/* read hart ID of CPU */
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index 154c7b2..4dd2aee 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -828,15 +828,6 @@
 					     propname, lenp);
 }
 
-bool ofnode_is_available(ofnode node)
-{
-	if (ofnode_is_np(node))
-		return of_device_is_available(ofnode_to_np(node));
-	else
-		return fdtdec_get_is_enabled(gd->fdt_blob,
-					     ofnode_to_offset(node));
-}
-
 fdt_addr_t ofnode_get_addr_size(ofnode node, const char *property,
 				fdt_size_t *sizep)
 {
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index abddbef..b8eb2d2 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -144,7 +144,7 @@
 	ofnode_for_each_subnode(node, dev_ofnode(dev->parent)) {
 		const char *device_type;
 
-		if (!ofnode_is_available(node))
+		if (!ofnode_is_enabled(node))
 			continue;
 
 		device_type = ofnode_read_string(node, "device_type");
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c
index b30dceb..d6484d7 100644
--- a/drivers/cpu/riscv_cpu.c
+++ b/drivers/cpu/riscv_cpu.c
@@ -77,7 +77,7 @@
 		const char *device_type;
 
 		/* skip if hart is marked as not available in the device tree */
-		if (!ofnode_is_available(node))
+		if (!ofnode_is_enabled(node))
 			continue;
 
 		device_type = ofnode_read_string(node, "device_type");
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index acd2992..8c0fb27 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -853,7 +853,7 @@
 
 	/* Check for enabled job ring node */
 	ofnode_for_each_subnode(node, dev_ofnode(dev)) {
-		if (!ofnode_is_available(node))
+		if (!ofnode_is_enabled(node))
 			continue;
 
 		jr_node = ofnode_read_u32_default(node, "reg", -1);
diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
index 2b6211c..c3f3d1f 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -65,7 +65,7 @@
 		struct driver *drv = NULL;
 		u32 protocol_id;
 
-		if (!ofnode_is_available(node))
+		if (!ofnode_is_enabled(node))
 			continue;
 
 		if (ofnode_read_u32(node, "reg", &protocol_id))
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 56aa58b..4886392 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -895,7 +895,7 @@
 	else
 		parts = ofnode_find_subnode(master->flash_node, "partitions");
 
-	if (!ofnode_valid(parts) || !ofnode_is_available(parts) ||
+	if (!ofnode_valid(parts) || !ofnode_is_enabled(parts) ||
 	    !ofnode_device_is_compatible(parts, "fixed-partitions"))
 		return 0;
 
@@ -905,7 +905,7 @@
 		fdt_addr_t offset;
 		fdt_size_t size;
 
-		if (!ofnode_is_available(child))
+		if (!ofnode_is_enabled(child))
 			continue;
 
 		offset = ofnode_get_addr_size_index_notrans(child, 0, &size);
diff --git a/drivers/mtd/nand/raw/zynq_nand.c b/drivers/mtd/nand/raw/zynq_nand.c
index 10e9cd1..14cb2ba 100644
--- a/drivers/mtd/nand/raw/zynq_nand.c
+++ b/drivers/mtd/nand/raw/zynq_nand.c
@@ -1095,7 +1095,7 @@
 		}
 	}
 
-	if (!ofnode_is_available(of_nand)) {
+	if (!ofnode_is_enabled(of_nand)) {
 		debug("Nand node in dt disabled\n");
 		return dm_scan_fdt_dev(dev);
 	}
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 8bc2b46..bbc4434 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1078,7 +1078,7 @@
 		return ret;
 	}
 
-	if (!ofnode_is_available(phandle_args.node))
+	if (!ofnode_is_enabled(phandle_args.node))
 		return -ENOENT;
 
 	priv->phy_of_node = phandle_args.node;
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index d43a85b..1fd5089 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -323,7 +323,7 @@
 	struct enetc_priv *priv = dev_get_priv(dev);
 	int res;
 
-	if (ofnode_valid(dev_ofnode(dev)) && !ofnode_is_available(dev_ofnode(dev))) {
+	if (ofnode_valid(dev_ofnode(dev)) && !ofnode_is_enabled(dev_ofnode(dev))) {
 		enetc_dbg(dev, "interface disabled\n");
 		return -ENODEV;
 	}
diff --git a/drivers/net/mscc_eswitch/felix_switch.c b/drivers/net/mscc_eswitch/felix_switch.c
index 709c9e3..2e5f45e 100644
--- a/drivers/net/mscc_eswitch/felix_switch.c
+++ b/drivers/net/mscc_eswitch/felix_switch.c
@@ -287,7 +287,7 @@
 	int err;
 
 	if (ofnode_valid(dev_ofnode(dev)) &&
-	    !ofnode_is_available(dev_ofnode(dev))) {
+	    !ofnode_is_enabled(dev_ofnode(dev))) {
 		dev_dbg(dev, "switch disabled\n");
 		return -ENODEV;
 	}
diff --git a/drivers/net/sja1105.c b/drivers/net/sja1105.c
index 4ca8709..48f044c 100644
--- a/drivers/net/sja1105.c
+++ b/drivers/net/sja1105.c
@@ -3316,7 +3316,7 @@
 	int rc;
 
 	if (ofnode_valid(dev_ofnode(dev)) &&
-	    !ofnode_is_available(dev_ofnode(dev))) {
+	    !ofnode_is_enabled(dev_ofnode(dev))) {
 		dev_dbg(dev, "switch disabled\n");
 		return -ENODEV;
 	}
diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index 9580fa3..b79e062 100644
--- a/drivers/net/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ti/am65-cpsw-nuss.c
@@ -719,7 +719,7 @@
 
 		node_name = ofnode_get_name(node);
 
-		disabled = !ofnode_is_available(node);
+		disabled = !ofnode_is_enabled(node);
 
 		ret = ofnode_read_u32(node, "reg", &port_id);
 		if (ret) {
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 16a6a69..058b2f6 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -766,7 +766,7 @@
 	if (ofnode_valid(dev_ofnode(parent)))
 		pci_dev_find_ofnode(parent, bdf, &node);
 
-	if (ofnode_valid(node) && !ofnode_is_available(node)) {
+	if (ofnode_valid(node) && !ofnode_is_enabled(node)) {
 		debug("%s: Ignoring disabled device\n", __func__);
 		return log_msg_ret("dis", -EPERM);
 	}
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 5bd340a..93a7508 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -740,7 +740,7 @@
 
 	/* First phase: Fill mvebu_pcie struct for each port */
 	ofnode_for_each_subnode(subnode, dev_ofnode(parent)) {
-		if (!ofnode_is_available(subnode))
+		if (!ofnode_is_enabled(subnode))
 			continue;
 
 		pcie = calloc(1, sizeof(*pcie));
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index bc489d5..29d5411 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -531,7 +531,7 @@
 
 		lanes |= num_lanes << (index << 3);
 
-		if (!ofnode_is_available(subnode))
+		if (!ofnode_is_enabled(subnode))
 			continue;
 
 		port = malloc(sizeof(*port));
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index 051a3bc..c6e30e2 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -657,7 +657,7 @@
 		struct fdt_pci_addr addr;
 		u32 slot = 0;
 
-		if (!ofnode_is_available(subnode))
+		if (!ofnode_is_enabled(subnode))
 			continue;
 
 		err = ofnode_read_pci_addr(subnode, 0, "reg", &addr);
@@ -696,7 +696,7 @@
 	pcie->priv = dev;
 
 	dev_for_each_subnode(subnode, dev) {
-		if (!ofnode_is_available(subnode))
+		if (!ofnode_is_enabled(subnode))
 			continue;
 
 		err = ofnode_read_pci_addr(subnode, 0, "reg", &addr);
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 7b0ef10..a674d7d 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -873,14 +873,6 @@
 				const char **propname, int *lenp);
 
 /**
- * ofnode_is_available() - check if a node is marked available
- *
- * @node: node to check
- * Return: true if node's 'status' property is "okay" (or is missing)
- */
-bool ofnode_is_available(ofnode node);
-
-/**
  * ofnode_get_addr_size() - get address and size from a property
  *
  * This does no address translation. It simply reads an property that contains
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 96b6b71..eca0108 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1058,7 +1058,7 @@
 {
 	do {
 		mem = ofnode_by_prop_value(mem, "device_type", "memory", 7);
-	} while (!ofnode_is_available(mem));
+	} while (!ofnode_is_enabled(mem));
 
 	return mem;
 }
diff --git a/net/dsa-uclass.c b/net/dsa-uclass.c
index 3bf4351..5b70464 100644
--- a/net/dsa-uclass.c
+++ b/net/dsa-uclass.c
@@ -432,7 +432,7 @@
 		 * skip registration if port id not found or if the port
 		 * is explicitly disabled in DT
 		 */
-		if (!ofnode_valid(pnode) || !ofnode_is_available(pnode))
+		if (!ofnode_valid(pnode) || !ofnode_is_enabled(pnode))
 			continue;
 
 		err = device_bind_driver_to_node(dev, DSA_PORT_CHILD_DRV_NAME,