]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: serial: Convert to livetree
authorSimon Glass <sjg@chromium.org>
Mon, 9 Nov 2020 03:36:49 +0000 (20:36 -0700)
committerSimon Glass <sjg@chromium.org>
Sun, 13 Dec 2020 14:58:17 +0000 (07:58 -0700)
Use a livetree function to read the colour.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/serial/sandbox.c

index e3967deaaf2121683da81d739a20f9113de20a87..8c74c3a1b8c203067c988141ecf04d0897e56f91 100644 (file)
@@ -12,7 +12,6 @@
 #include <common.h>
 #include <console.h>
 #include <dm.h>
-#include <fdtdec.h>
 #include <lcd.h>
 #include <os.h>
 #include <serial.h>
@@ -221,8 +220,7 @@ static int sandbox_serial_ofdata_to_platdata(struct udevice *dev)
        if (CONFIG_IS_ENABLED(OF_PLATDATA))
                return 0;
        plat->colour = -1;
-       colour = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
-                            "sandbox,text-colour", NULL);
+       colour = dev_read_string(dev, "sandbox,text-colour");
        if (colour) {
                for (i = 0; i < ARRAY_SIZE(ansi_colour); i++) {
                        if (!strcmp(colour, ansi_colour[i])) {