mtd: nand: socrates: use the mtd instance embedded in struct nand_chip
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jan 12 15:59:25 PST 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=a723bf6a58b17379c27f869402baddf4b0d2c7dc
Commit: a723bf6a58b17379c27f869402baddf4b0d2c7dc
Parent: 17dd20bd7d4389d3bc54d71e263088039203ea07
Author: Boris BREZILLON <boris.brezillon at free-electrons.com>
AuthorDate: Fri Dec 11 15:04:06 2015 +0100
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Dec 18 13:13:49 2015 -0800
mtd: nand: socrates: use the mtd instance embedded in struct nand_chip
struct nand_chip now embeds an mtd device. Make use of this mtd instance.
Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/socrates_nand.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c
index 2dfb1e0..925761c 100644
--- a/drivers/mtd/nand/socrates_nand.c
+++ b/drivers/mtd/nand/socrates_nand.c
@@ -30,7 +30,6 @@
struct socrates_nand_host {
struct nand_chip nand_chip;
- struct mtd_info mtd;
void __iomem *io_base;
struct device *dev;
};
@@ -159,8 +158,8 @@ static int socrates_nand_probe(struct platform_device *ofdev)
return -EIO;
}
- mtd = &host->mtd;
nand_chip = &host->nand_chip;
+ mtd = nand_to_mtd(nand_chip);
host->dev = &ofdev->dev;
nand_chip->priv = host; /* link the private data structures */
@@ -216,7 +215,7 @@ out:
static int socrates_nand_remove(struct platform_device *ofdev)
{
struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev);
- struct mtd_info *mtd = &host->mtd;
+ struct mtd_info *mtd = nand_to_mtd(&host->nand_chip);
nand_release(mtd);
More information about the linux-mtd-cvs
mailing list