[PATCH 2/3] sandbox: serial: Convert to livetree
Simon Glass
sjg at chromium.org
Mon Nov 9 04:36:49 CET 2020
Use a livetree function to read the colour.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
drivers/serial/sandbox.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index e3967deaaf2..8c74c3a1b8c 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -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])) {
--
2.29.2.222.g5d2a92d10f8-goog
More information about the U-Boot
mailing list