diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2017-06-27 03:12:59 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-12 05:41:48 +0300 |
commit | 1ceac700802c819c856298b6625a612c7c56e570 (patch) | |
tree | 194f340fc1daa34c296246494994f5eb271c89b7 /drivers/net/phy | |
parent | 6308e71be484be4cc4df8889cf22a77bc0cde48e (diff) | |
download | u-boot-1ceac700802c819c856298b6625a612c7c56e570.tar.xz |
net: phy: cortina: 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/phy')
-rw-r--r-- | drivers/net/phy/cortina.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c index fd130d5b82..e0e9ed9767 100644 --- a/drivers/net/phy/cortina.c +++ b/drivers/net/phy/cortina.c @@ -139,7 +139,8 @@ void cs4340_upload_firmware(struct phy_device *phydev) size_t fw_length = CONFIG_CORTINA_FW_LENGTH; addr = malloc(CONFIG_CORTINA_FW_LENGTH); - ret = nand_read(nand_info[0], (loff_t)CONFIG_CORTINA_FW_ADDR, + ret = nand_read(get_nand_dev_by_index(0), + (loff_t)CONFIG_CORTINA_FW_ADDR, &fw_length, (u_char *)addr); if (ret == -EUCLEAN) { printf("NAND read of Cortina firmware at 0x%x failed %d\n", |