]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/emul/sandbox_hub.c
usb: gadget: sdp: extend images compatible for jumps
[u-boot] / drivers / usb / emul / sandbox_hub.c
index f0939b19f484b2bbfac8e0db01bd5f8ce12e48e9..1432858fd594cd3b70ba7b4a4b0ddb9334fd3f35 100644 (file)
@@ -96,7 +96,12 @@ static struct usb_hub_descriptor hub_desc = {
                                                                1 << 7),
        .bPwrOn2PwrGood         = 2,
        .bHubContrCurrent       = 5,
-       .DeviceRemovable        = {0, 0xff}, /* all ports removeable */
+       {
+               {
+                       /* all ports removeable */
+                       .DeviceRemovable        = {0, 0xff}
+               }
+       }
 #if SANDBOX_NUM_PORTS > 8
 #error "This code sets up an incorrect mask"
 #endif
@@ -277,8 +282,7 @@ static int sandbox_child_post_bind(struct udevice *dev)
 {
        struct sandbox_hub_platdata *plat = dev_get_parent_platdata(dev);
 
-       plat->port = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg",
-                                   -1);
+       plat->port = dev_read_u32_default(dev, "reg", -1);
 
        return 0;
 }