[U-Boot] [PATCH v2 09/15] cmd: nand: remove direct access to struct mtd_info->priv

Grygorii Strashko grygorii.strashko at ti.com
Tue Jan 31 22:37:11 CET 2017


Replace direct access to struct mtd_info->priv with proper
accessor mtd_to_nand().

Signed-off-by: Grygorii Strashko <grygorii.strashko at ti.com>
---
 cmd/nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/nand.c b/cmd/nand.c
index f2b440e..d9de978 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -128,7 +128,7 @@ static int set_dev(int dev)
 	nand_curr_device = dev;
 
 #ifdef CONFIG_SYS_NAND_SELECT_DEVICE
-	board_nand_select_device(mtd->priv, dev);
+	board_nand_select_device(mtd_to_nand(mtd), dev);
 #endif
 
 	return 0;
-- 
2.10.1.dirty



More information about the U-Boot mailing list