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/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index c64c9b5..98450db 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -148,7 +148,7 @@
 	 * Bind it to the node, too, so that it can get its base address.
 	 */
 	ret = device_bind_driver_to_node(dev, "socfpga_sysreset", "sysreset",
-					 dev->node, &sys_child);
+					 dev_ofnode(dev), &sys_child);
 	if (ret)
 		debug("Warning: No sysreset driver: ret=%d\n", ret);