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/core/device.c b/drivers/core/device.c
index bd4ecc9..6a9bee0 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -68,7 +68,7 @@
 	dev_set_plat(dev, plat);
 	dev->driver_data = driver_data;
 	dev->name = name;
-	dev->node = node;
+	dev_set_ofnode(dev, node);
 	dev->parent = parent;
 	dev->driver = drv;
 	dev->uclass = uc;