diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-08-14 01:46:05 +0300 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-09-03 00:11:40 +0300 |
commit | 1976367173a47f801c67b5f456922d79c60d0d42 (patch) | |
tree | 55a67d031aa49b5a072201522b2e2153a76b62ad /drivers/mtd/spi-nor/fsl-quadspi.c | |
parent | a39f1d5e4303f535840a44eee87326fd9743de7c (diff) | |
download | linux-1976367173a47f801c67b5f456922d79c60d0d42.tar.xz |
mtd: spi-nor: embed struct mtd_info within struct spi_nor
This reflects the proper layering, so let's do it.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Joachim Eastwood <manabian@gmail.com>
Diffstat (limited to 'drivers/mtd/spi-nor/fsl-quadspi.c')
-rw-r--r-- | drivers/mtd/spi-nor/fsl-quadspi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c index ad9f73ae6eea..19f61783cb56 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -259,7 +259,6 @@ static struct fsl_qspi_devtype_data imx6ul_data = { #define FSL_QSPI_MAX_CHIP 4 struct fsl_qspi { - struct mtd_info mtd[FSL_QSPI_MAX_CHIP]; struct spi_nor nor[FSL_QSPI_MAX_CHIP]; void __iomem *iobase; void __iomem *ahb_addr; @@ -888,7 +887,7 @@ static int fsl_qspi_erase(struct spi_nor *nor, loff_t offs) int ret; dev_dbg(nor->dev, "%dKiB at 0x%08x:0x%08x\n", - nor->mtd->erasesize / 1024, q->chip_base_addr, (u32)offs); + nor->mtd.erasesize / 1024, q->chip_base_addr, (u32)offs); ret = fsl_qspi_runcmd(q, nor->erase_opcode, offs, 0); if (ret) @@ -1013,9 +1012,8 @@ static int fsl_qspi_probe(struct platform_device *pdev) i *= 2; nor = &q->nor[i]; - mtd = &q->mtd[i]; + mtd = &nor->mtd; - nor->mtd = mtd; nor->dev = dev; nor->priv = q; @@ -1086,7 +1084,7 @@ last_init_failed: /* skip the holes */ if (!q->has_second_chip) i *= 2; - mtd_device_unregister(&q->mtd[i]); + mtd_device_unregister(&q->nor[i].mtd); } mutex_failed: mutex_destroy(&q->lock); @@ -1106,7 +1104,7 @@ static int fsl_qspi_remove(struct platform_device *pdev) /* skip the holes */ if (!q->has_second_chip) i *= 2; - mtd_device_unregister(&q->mtd[i]); + mtd_device_unregister(&q->nor[i].mtd); } /* disable the hardware */ |