diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-08-13 15:46:03 -0700 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-09-02 14:11:40 -0700 |
commit | c9ec3900abf279d9276a0661c9bed2550c1f0bb5 (patch) | |
tree | ac20ee2bf17cad50e073941ebe46e7f3ca3a0971 /drivers/mtd/spi-nor/spi-nor.c | |
parent | 0f12a27b47284e86eaa4a5ad3877ec3018463178 (diff) | |
download | linux-next-c9ec3900abf279d9276a0661c9bed2550c1f0bb5.tar.gz |
mtd: spi-nor: assign mtd->priv in spi_nor_scan()
Layering suggests that the SPI NOR layer (not the hardware driver)
should be initializing the MTD layer.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Joachim Eastwood <manabian@gmail.com>
Diffstat (limited to 'drivers/mtd/spi-nor/spi-nor.c')
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 25372f9b534e..d98180e73307 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -1061,6 +1061,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) if (!mtd->name) mtd->name = dev_name(dev); + mtd->priv = nor; mtd->type = MTD_NORFLASH; mtd->writesize = 1; mtd->flags = MTD_CAP_NORFLASH; |