diff options
author | Vimal Singh <vimalsingh@ti.com> | 2010-01-05 11:31:08 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-26 17:47:39 +0100 |
commit | f35b6eda5184e46bf2393d8970b4b9498daf7bcf (patch) | |
tree | 82045060774fe9e6eb95d5f9091f00b2fe4a33d9 /drivers/mtd/nand/omap2.c | |
parent | mtd: omap2: fixing compilation warning (diff) | |
download | linux-f35b6eda5184e46bf2393d8970b4b9498daf7bcf.tar.xz linux-f35b6eda5184e46bf2393d8970b4b9498daf7bcf.zip |
mtd: omap2: correct 'info' pointer in 'omap_nand_remove'
Removing OMAP NAND driver, when loaded as a module, gives error and
does not get success. This fixes this and makes driver loadable and
removable run time.
Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/omap2.c')
-rw-r--r-- | drivers/mtd/nand/omap2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 4eea97c03b2b..16120e2dd4a3 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) |