diff options
Diffstat (limited to 'drivers/mtd/spi-nor')
-rw-r--r-- | drivers/mtd/spi-nor/cadence-quadspi.c | 2 | ||||
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 16 |
2 files changed, 7 insertions, 11 deletions
diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c index 2372482ac1..ea53d2cd84 100644 --- a/drivers/mtd/spi-nor/cadence-quadspi.c +++ b/drivers/mtd/spi-nor/cadence-quadspi.c @@ -1120,7 +1120,7 @@ static int cqspi_setup_flash(struct device_d *dev, if (ret) return ret; - mtd->parent = nor->dev; + mtd->dev.parent = nor->dev; } else { nor->dev = dev; } diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 5cc4573178..350b82a6be 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -540,14 +540,10 @@ static int spi_nor_erase(struct mtd_info *mtd, struct erase_info *instr) spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_ERASE); - instr->state = MTD_ERASE_DONE; - mtd_erase_callback(instr); - return ret; erase_err: spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_ERASE); - instr->state = MTD_ERASE_FAILED; return ret; } @@ -1441,20 +1437,20 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, mtd->writesize = 1; mtd->flags = MTD_CAP_NORFLASH; mtd->size = params.size; - mtd->erase = spi_nor_erase; - mtd->read = spi_nor_read; + mtd->_erase = spi_nor_erase; + mtd->_read = spi_nor_read; /* nor protection support for STmicro chips */ if (JEDEC_MFR(info) == CFI_MFR_ST) { - mtd->lock = spi_nor_lock; - mtd->unlock = spi_nor_unlock; + mtd->_lock = spi_nor_lock; + mtd->_unlock = spi_nor_unlock; } /* sst nor chips use AAI word program */ if (info->flags & SST_WRITE) - mtd->write = sst_write; + mtd->_write = sst_write; else - mtd->write = spi_nor_write; + mtd->_write = spi_nor_write; if (info->flags & USE_FSR) nor->flags |= SNOR_F_USE_FSR; |