dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index d3744ef..e92b24f 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -43,7 +43,7 @@
 	debug("%s(dev=%p, index=%d, reset_ctl=%p)\n", __func__, dev, index,
 	      reset_ctl);
 
-	ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev->of_offset,
+	ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev_of_offset(dev),
 					     "resets", "#reset-cells", 0,
 					     index, &args);
 	if (ret) {
@@ -88,7 +88,7 @@
 	debug("%s(dev=%p, name=%s, reset_ctl=%p)\n", __func__, dev, name,
 	      reset_ctl);
 
-	index = fdt_stringlist_search(gd->fdt_blob, dev->of_offset,
+	index = fdt_stringlist_search(gd->fdt_blob, dev_of_offset(dev),
 				      "reset-names", name);
 	if (index < 0) {
 		debug("fdt_stringlist_search() failed: %d\n", index);