diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2017-06-26 19:13:00 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-11 22:41:48 -0400 |
commit | 750b34c9ae783819822ab0ccf07b4d2dc697a874 (patch) | |
tree | 531752ff1802c6fff1edba0a1c71d92f0a2c342b /drivers/net/fm/fm.c | |
parent | 1ceac700802c819c856298b6625a612c7c56e570 (diff) |
net: fm: use get_nand_dev_by_index()
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.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net/fm/fm.c')
-rw-r--r-- | drivers/net/fm/fm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c index 89f0d6a14e..9fe34ad4a9 100644 --- a/drivers/net/fm/fm.c +++ b/drivers/net/fm/fm.c @@ -357,7 +357,8 @@ int fm_init_common(int index, struct ccsr_fman *reg) size_t fw_length = CONFIG_SYS_QE_FMAN_FW_LENGTH; void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH); - rc = nand_read(nand_info[0], (loff_t)CONFIG_SYS_FMAN_FW_ADDR, + rc = nand_read(get_nand_dev_by_index(0), + (loff_t)CONFIG_SYS_FMAN_FW_ADDR, &fw_length, (u_char *)addr); if (rc == -EUCLEAN) { printf("NAND read of FMAN firmware at offset 0x%x failed %d\n", |