From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grygorii Strashko Date: Mon, 26 Jun 2017 19:12:59 -0500 Subject: [U-Boot] [PATCH v4 09/18] net: phy: cortina: use get_nand_dev_by_index() In-Reply-To: <20170627001308.23513-1-grygorii.strashko@ti.com> References: <20170627001308.23513-1-grygorii.strashko@ti.com> Message-ID: <20170627001308.23513-10-grygorii.strashko@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Reviewed-by: Joe Hershberger --- drivers/net/phy/cortina.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c index fd130d5..e0e9ed9 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", -- 2.10.1