diff mbox

[U-Boot,v4,08/18] cmd: nand: remove direct access to struct mtd_info->priv

Message ID 20170627001308.23513-9-grygorii.strashko@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Grygorii Strashko June 27, 2017, 12:12 a.m. UTC
Replace direct access to struct mtd_info->priv with proper
accessor mtd_to_nand().

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

Comments

Tom Rini July 12, 2017, 12:15 p.m. UTC | #1
On Mon, Jun 26, 2017 at 07:12:58PM -0500, Grygorii Strashko wrote:

> Replace direct access to struct mtd_info->priv with proper
> accessor mtd_to_nand().
> 
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

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;