From ad92dff28c26b127391692e4d675a463ee4a4215 Mon Sep 17 00:00:00 2001 From: Mugunthan V N Date: Mon, 26 Jun 2017 19:12:51 -0500 Subject: cmd: nand: abstract global variable usage for dm conversion nand_info is used all over the file so abstract it with get_nand_dev_by_index() which will help for DM conversion. Signed-off-by: Mugunthan V N Signed-off-by: Grygorii Strashko --- include/nand.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/nand.h') diff --git a/include/nand.h b/include/nand.h index bc5dd81901..c8556e1753 100644 --- a/include/nand.h +++ b/include/nand.h @@ -145,4 +145,13 @@ int spl_nand_erase_one(int block, int page); /* platform specific init functions */ void sunxi_nand_init(void); +/* + * get_nand_dev_by_index - Get the nand info based in index. + * + * @dev - index to the nand device. + * + * returns pointer to the nand device info structure or NULL on failure. + */ +struct mtd_info *get_nand_dev_by_index(int dev); + #endif /* _NAND_H_ */ -- cgit v1.2.3