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/tee/optee/core.c b/drivers/tee/optee/core.c
index 7c38d6e..b898c32 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -592,7 +592,7 @@
 	const char *method;
 
 	debug("optee: looking for conduit method in DT.\n");
-	method = ofnode_get_property(dev->node, "method", NULL);
+	method = ofnode_get_property(dev_ofnode(dev), "method", NULL);
 	if (!method) {
 		debug("optee: missing \"method\" property\n");
 		return ERR_PTR(-ENXIO);