summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-05-12 08:24:54 +0200
committerMark Brown <broonie@kernel.org>2018-05-13 10:09:39 +0900
commitb6456057038b572382753b5e963f56f10e704804 (patch)
tree622df2420d23ffaa8fdd84c50fa46401ad91797f /drivers/spi
parentc1f5ba70decfc2f35edcc10505e3e78fb528d212 (diff)
spi: bcm-qspi: Fix build failure caused by spi_flash_read() API removal
Patch http://patchwork.ozlabs.org/patch/905205/ has been partially applied, and changes to the bcm-qspi driver have been lost somehow (probably due to a conflict when applying the patch). Remove the ->spi_flash_read() bits from this driver to fix the build error. Fixes: c1f5ba70decf ("spi: Get rid of the spi_flash_read() API") Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-bcm-qspi.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c
index 9f94268a68b5..57ceec6c6301 100644
--- a/drivers/spi/spi-bcm-qspi.c
+++ b/drivers/spi/spi-bcm-qspi.c
@@ -944,9 +944,10 @@ static int bcm_qspi_mspi_exec_mem_op(struct spi_device *spi,
return ret;
}
-static int bcm_qspi_exec_mem_op(struct spi_device *spi,
+static int bcm_qspi_exec_mem_op(struct spi_mem *mem,
const struct spi_mem_op *op)
{
+ struct spi_device *spi = mem->spi;
struct bcm_qspi *qspi = spi_master_get_devdata(spi->master);
int ret = 0;
bool mspi_read = false;
@@ -991,34 +992,6 @@ static int bcm_qspi_exec_mem_op(struct spi_device *spi,
return ret;
}
-static int bcm_qspi_exec_mem_op_wrapper(struct spi_mem *mem,
- const struct spi_mem_op *op)
-{
- return bcm_qspi_exec_mem_op(mem->spi, op);
-}
-
-static int bcm_qspi_flash_read_wrapper(struct spi_device *spi,
- struct spi_flash_read_message *msg)
-{
- int ret;
- struct spi_mem_op op = SPI_MEM_OP(SPI_MEM_OP_CMD(msg->read_opcode, 1),
- SPI_MEM_OP_ADDR(msg->addr_width,
- msg->from,
- msg->addr_nbits),
- SPI_MEM_OP_DUMMY(msg->dummy_bytes,
- msg->addr_nbits),
- SPI_MEM_OP_DATA_IN(msg->len,
- msg->buf,
- msg->data_nbits));
-
- msg->retlen = 0;
- ret = bcm_qspi_exec_mem_op(spi, &op);
- if (!ret)
- msg->retlen = msg->len;
-
- return ret;
-}
-
static void bcm_qspi_cleanup(struct spi_device *spi)
{
struct bcm_qspi_parms *xp = spi_get_ctldata(spi);
@@ -1214,7 +1187,7 @@ static void bcm_qspi_hw_uninit(struct bcm_qspi *qspi)
}
static const struct spi_controller_mem_ops bcm_qspi_mem_ops = {
- .exec_op = bcm_qspi_exec_mem_op_wrapper,
+ .exec_op = bcm_qspi_exec_mem_op,
};
static const struct of_device_id bcm_qspi_of_match[] = {
@@ -1259,7 +1232,6 @@ int bcm_qspi_probe(struct platform_device *pdev,
master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_RX_DUAL | SPI_RX_QUAD;
master->setup = bcm_qspi_setup;
master->transfer_one = bcm_qspi_transfer_one;
- master->spi_flash_read = bcm_qspi_flash_read_wrapper;
master->mem_ops = &bcm_qspi_mem_ops;
master->cleanup = bcm_qspi_cleanup;
master->dev.of_node = dev->of_node;