]> git.sur5r.net Git - u-boot/blobdiff - drivers/video/sandbox_sdl.c
lpi2c: Fix bus stop problem in xfer
[u-boot] / drivers / video / sandbox_sdl.c
index 450628e07c4a7f846aef7d6e526cb38e10a17e96..913651c565c8affe67c7ccbd22899fe220cd59ca 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2013 Google, Inc
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -20,15 +19,6 @@ enum {
        LCD_MAX_HEIGHT          = 768,
 };
 
-
-/* This platform data is needed in tests, so declare it here */
-struct sandbox_sdl_plat {
-       int xres;
-       int yres;
-       int bpix;
-       int rot;
-};
-
 static int sandbox_sdl_probe(struct udevice *dev)
 {
        struct sandbox_sdl_plat *plat = dev_get_platdata(dev);
@@ -44,6 +34,8 @@ static int sandbox_sdl_probe(struct udevice *dev)
        uc_priv->ysize = plat->yres;
        uc_priv->bpix = plat->bpix;
        uc_priv->rot = plat->rot;
+       uc_priv->vidconsole_drv_name = plat->vidconsole_drv_name;
+       uc_priv->font_size = plat->font_size;
 
        return 0;
 }
@@ -53,7 +45,7 @@ static int sandbox_sdl_bind(struct udevice *dev)
        struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev);
        struct sandbox_sdl_plat *plat = dev_get_platdata(dev);
        const void *blob = gd->fdt_blob;
-       int node = dev->of_offset;
+       int node = dev_of_offset(dev);
        int ret = 0;
 
        plat->xres = fdtdec_get_int(blob, node, "xres", LCD_MAX_WIDTH);