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>
diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c
index 2bc1a0d..a964347 100644
--- a/drivers/gpio/mpc8xxx_gpio.c
+++ b/drivers/gpio/mpc8xxx_gpio.c
@@ -191,7 +191,7 @@
 	u32 i;
 	u32 reg[4];
 
-	if (ofnode_read_bool(dev->node, "little-endian"))
+	if (ofnode_read_bool(dev_ofnode(dev), "little-endian"))
 		data->little_endian = true;
 
 	if (data->little_endian)
@@ -257,7 +257,7 @@
 	if (!str)
 		return -ENOMEM;
 
-	if (ofnode_device_is_compatible(dev->node, "fsl,qoriq-gpio")) {
+	if (ofnode_device_is_compatible(dev_ofnode(dev), "fsl,qoriq-gpio")) {
 		unsigned long gpibe = data->addr + sizeof(struct ccsr_gpio)
 			- sizeof(u32);
 
diff --git a/drivers/gpio/octeon_gpio.c b/drivers/gpio/octeon_gpio.c
index 958516d..42eae79 100644
--- a/drivers/gpio/octeon_gpio.c
+++ b/drivers/gpio/octeon_gpio.c
@@ -190,7 +190,7 @@
 			GPIO_CONST_GPIOS_MASK;
 	} else {
 		priv->base = dev_remap_addr(dev);
-		uc_priv->gpio_count = ofnode_read_u32_default(dev->node,
+		uc_priv->gpio_count = ofnode_read_u32_default(dev_ofnode(dev),
 							      "nr-gpios", 32);
 	}