]> git.sur5r.net Git - u-boot/commitdiff
net: phy: cortina: use get_nand_dev_by_index()
authorGrygorii Strashko <grygorii.strashko@ti.com>
Tue, 27 Jun 2017 00:12:59 +0000 (19:12 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 12 Jul 2017 02:41:48 +0000 (22:41 -0400)
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>
drivers/net/phy/cortina.c

index fd130d5b82060b967afe67b93c8bbd846d4f97e3..e0e9ed97672411fe5ee257676e5fc931fe6d0288 100644 (file)
@@ -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",