Patchwork [2/3,NAND,OMAP] : correct 'info' pointer in 'omap_nand_remove'

login
register
mail settings
Submitter vimal singh
Date Jan. 6, 2010, 2:05 p.m.
Message ID <ce9ab5791001060605j7a424203lcb90f3d79d0ddfae@mail.gmail.com>
Download mbox | patch
Permalink /patch/71293/
State Awaiting Upstream, archived
Delegated to: Tony Lindgren
Headers show

Comments

Patch

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 4eea97c..16120e2 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1054,7 +1054,8 @@  out_free_info:
 static int omap_nand_remove(struct platform_device *pdev)
 {
 	struct mtd_info *mtd = platform_get_drvdata(pdev);
-	struct omap_nand_info *info = mtd->priv;
+	struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
+							mtd);

 	platform_set_drvdata(pdev, NULL);
 	if (use_dma)