X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Femul%2Fsandbox_hub.c;h=1432858fd594cd3b70ba7b4a4b0ddb9334fd3f35;hb=ccd7a4d2f42df7ebc8fd0fbbd31d5e6534cb590c;hp=f0939b19f484b2bbfac8e0db01bd5f8ce12e48e9;hpb=d53ecad92f06d2e38a5cbc13af7473867c7fa277;p=u-boot diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c index f0939b19f4..1432858fd5 100644 --- a/drivers/usb/emul/sandbox_hub.c +++ b/drivers/usb/emul/sandbox_hub.c @@ -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; }