doc: Add top-level description about U-Boot documentation
[oweals/u-boot.git] / drivers / video / tegra.c
index 217f05f9e2ec26cfc90acbf48b154b672723c4bd..f4bae9fc3694743878eeaf966bb626d29c7818a6 100644 (file)
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2011 The Chromium OS Authors.
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -251,7 +251,7 @@ static int setup_window(struct disp_ctl_win *win,
 /**
  * Register a new display based on device tree configuration.
  *
- * The frame buffer can be positioned by U-Boot or overriden by the fdt.
+ * The frame buffer can be positioned by U-Boot or overridden by the fdt.
  * You should pass in the U-Boot address here, and check the contents of
  * struct tegra_lcd_priv to see what was actually chosen.
  *
@@ -338,12 +338,12 @@ static int tegra_lcd_ofdata_to_platdata(struct udevice *dev)
        struct tegra_lcd_priv *priv = dev_get_priv(dev);
        const void *blob = gd->fdt_blob;
        struct display_timing *timing;
-       int node = dev->of_offset;
+       int node = dev_of_offset(dev);
        int panel_node;
        int rgb;
        int ret;
 
-       priv->disp = (struct disp_ctlr *)dev_get_addr(dev);
+       priv->disp = (struct disp_ctlr *)devfdt_get_addr(dev);
        if (!priv->disp) {
                debug("%s: No display controller address\n", __func__);
                return -EINVAL;
@@ -392,7 +392,7 @@ static int tegra_lcd_bind(struct udevice *dev)
 {
        struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
        const void *blob = gd->fdt_blob;
-       int node = dev->of_offset;
+       int node = dev_of_offset(dev);
        int rgb;
 
        rgb = fdt_subnode_offset(blob, node, "rgb");