mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
mtd: nand: mxc: 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@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
parent
5a9f23ffb6
commit
a008deb165
1 changed files with 2 additions and 3 deletions
|
@ -173,7 +173,6 @@ struct mxc_nand_devtype_data {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mxc_nand_host {
|
struct mxc_nand_host {
|
||||||
struct mtd_info mtd;
|
|
||||||
struct nand_chip nand;
|
struct nand_chip nand;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|
||||||
|
@ -1514,7 +1513,7 @@ static int mxcnd_probe(struct platform_device *pdev)
|
||||||
host->dev = &pdev->dev;
|
host->dev = &pdev->dev;
|
||||||
/* structures must be linked */
|
/* structures must be linked */
|
||||||
this = &host->nand;
|
this = &host->nand;
|
||||||
mtd = &host->mtd;
|
mtd = nand_to_mtd(this);
|
||||||
mtd->priv = this;
|
mtd->priv = this;
|
||||||
mtd->dev.parent = &pdev->dev;
|
mtd->dev.parent = &pdev->dev;
|
||||||
mtd->name = DRIVER_NAME;
|
mtd->name = DRIVER_NAME;
|
||||||
|
@ -1702,7 +1701,7 @@ static int mxcnd_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct mxc_nand_host *host = platform_get_drvdata(pdev);
|
struct mxc_nand_host *host = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
nand_release(&host->mtd);
|
nand_release(nand_to_mtd(&host->nand));
|
||||||
if (host->clk_act)
|
if (host->clk_act)
|
||||||
clk_disable_unprepare(host->clk);
|
clk_disable_unprepare(host->clk);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue