summaryrefslogtreecommitdiff
path: root/drivers/video/exynos
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-01-17 16:52:55 -0700
committerSimon Glass <sjg@chromium.org>2017-02-08 06:12:14 -0700
commite160f7d430f163bc42757aff3bf2bcac0a459f02 (patch)
treece006f94b4a52f6fff567eacd86922c3be6df706 /drivers/video/exynos
parent8aa41363ebf46b9ff63b311bd2aa793c67a49def (diff)
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>
Diffstat (limited to 'drivers/video/exynos')
-rw-r--r--drivers/video/exynos/exynos_dp.c2
-rw-r--r--drivers/video/exynos/exynos_fb.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index fc39f2c562..c5039e7b43 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -880,7 +880,7 @@ static int exynos_dp_ofdata_to_platdata(struct udevice *dev)
{
struct exynos_dp_priv *priv = dev_get_priv(dev);
const void *blob = gd->fdt_blob;
- unsigned int node = dev->of_offset;
+ unsigned int node = dev_of_offset(dev);
fdt_addr_t addr;
addr = dev_get_addr(dev);
diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c
index 5483d6613f..46320e7f02 100644
--- a/drivers/video/exynos/exynos_fb.c
+++ b/drivers/video/exynos/exynos_fb.c
@@ -383,7 +383,7 @@ void exynos_fimd_lcd_init(struct udevice *dev)
unsigned int offset;
unsigned int node;
- node = dev->of_offset;
+ node = dev_of_offset(dev);
if (fdtdec_get_bool(gd->fdt_blob, node, "samsung,disable-sysmmu"))
exynos_fimd_disable_sysmmu();
@@ -482,7 +482,7 @@ unsigned long exynos_fimd_calc_fbsize(struct exynos_fb_priv *priv)
int exynos_fb_ofdata_to_platdata(struct udevice *dev)
{
struct exynos_fb_priv *priv = dev_get_priv(dev);
- unsigned int node = dev->of_offset;
+ unsigned int node = dev_of_offset(dev);
const void *blob = gd->fdt_blob;
fdt_addr_t addr;