From: Simon Glass Date: Mon, 9 Nov 2020 03:36:49 +0000 (-0700) Subject: sandbox: serial: Convert to livetree X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=1bf0a4021905ed7ab9f1909a8422b7a71147b653;p=u-boot.git sandbox: serial: Convert to livetree Use a livetree function to read the colour. Signed-off-by: Simon Glass --- diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c index e3967deaaf..8c74c3a1b8 100644 --- a/drivers/serial/sandbox.c +++ b/drivers/serial/sandbox.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -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])) {