Message ID | 20170210202304.20652-16-grygorii.strashko@ti.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show |
> As part of preparation for nand DM conversion the new API has been > introduced to remove direct access to nand_info array. So, use it here > instead of accessing to nand_info array directly. > > Cc: Hannes Schmelzer <oe5hpm@oevsv.at> > Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> > --- > board/BuR/common/common.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c > index e947e54..cd084d9 100644 > --- a/board/BuR/common/common.c > +++ b/board/BuR/common/common.c > @@ -259,7 +259,8 @@ static int load_devicetree(void) > } > #ifdef CONFIG_NAND > dtbsize = 0x20000; > - rc = nand_read_skip_bad(nand_info[0], 0x40000, (size_t *)&dtbsize, > + rc = nand_read_skip_bad(get_nand_dev_by_index(0), 0x40000, > + (size_t *)&dtbsize, > NULL, 0x20000, (u_char *)dtbaddr); > #else > char *dtbname = getenv("dtb"); > -- > 2.10.1.dirty Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
On 21 February 2017 at 04:53, Hannes Schmelzer <Hannes.Schmelzer@br-automation.com> wrote: >> As part of preparation for nand DM conversion the new API has been >> introduced to remove direct access to nand_info array. So, use it here >> instead of accessing to nand_info array directly. >> >> Cc: Hannes Schmelzer <oe5hpm@oevsv.at> >> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> >> --- >> board/BuR/common/common.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index e947e54..cd084d9 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -259,7 +259,8 @@ static int load_devicetree(void) } #ifdef CONFIG_NAND dtbsize = 0x20000; - rc = nand_read_skip_bad(nand_info[0], 0x40000, (size_t *)&dtbsize, + rc = nand_read_skip_bad(get_nand_dev_by_index(0), 0x40000, + (size_t *)&dtbsize, NULL, 0x20000, (u_char *)dtbaddr); #else char *dtbname = getenv("dtb");
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Cc: Hannes Schmelzer <oe5hpm@oevsv.at> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> --- board/BuR/common/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)