On 4 November 2018 at 23:04, Keerthy <j-keer...@ti.com> wrote: > Instead of two staged ofnode_to_offset followed by > device_get_global_by_of_offset approach, direcly use the > device_get_global_by_ofnode to fetch the device. > > Signed-off-by: Keerthy <j-keer...@ti.com> > --- > drivers/misc/fs_loader.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <s...@chromium.org> with change below > > diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c > index b7bb96a..5afc941 100644 > --- a/drivers/misc/fs_loader.c > +++ b/drivers/misc/fs_loader.c > @@ -55,11 +55,9 @@ static int select_fs_dev(struct device_platdata *plat) > > node = ofnode_get_by_phandle(plat->phandlepart.phandle); > > - int of_offset = ofnode_to_offset(node); > - > struct udevice *dev; > > - ret = device_get_global_by_of_offset(of_offset, &dev); > + ret = device_get_global_by_ofnode(node, &dev); > if (!ret) { > struct blk_desc *desc = blk_get_by_device(dev); > if (desc) { > @@ -190,6 +188,7 @@ static int fw_get_filesystem_firmware(struct > device_platdata *plat, > > ret = fs_read(fw_priv->name, (ulong)map_to_sysmem(firmware->data), > fw_priv->offset, firmware->size, &actread); > + Please drop this blank line. > if (ret) { > debug("Error: %d Failed to read %s from flash %lld != %d.\n", > ret, fw_priv->name, actread, firmware->size); > -- > 1.9.1 > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot