From: Mikhail Kshevetskiy Date: Sun, 12 Oct 2025 12:16:55 +0000 (+0300) Subject: spi: airoha: remove unnecessary switch to non-dma mode X-Git-Tag: v6.19-rc1~150^2~28^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7350f8dc15bfbb7abf1ce4babea6fcace1c574c5;p=thirdparty%2Fkernel%2Flinux.git spi: airoha: remove unnecessary switch to non-dma mode The code switches to dma at the start of dirmap operation and returns to non-dma at the end of dirmap operation, so an additional switch to non-dma at the start of dirmap write is not required. Signed-off-by: Mikhail Kshevetskiy Acked-by: Lorenzo Bianconi Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20251012121707.2296160-5-mikhail.kshevetskiy@iopsys.eu Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c index 3d3233c525dff..5ad3180ac6daa 100644 --- a/drivers/spi/spi-airoha-snfi.c +++ b/drivers/spi/spi-airoha-snfi.c @@ -815,9 +815,6 @@ static ssize_t airoha_snand_dirmap_write(struct spi_mem_dirmap_desc *desc, int err; as_ctrl = spi_controller_get_devdata(spi->controller); - err = airoha_snand_set_mode(as_ctrl, SPI_MODE_MANUAL); - if (err < 0) - return err; memcpy(txrx_buf + offs, buf, len); dma_addr = dma_map_single(as_ctrl->dev, txrx_buf, SPI_NAND_CACHE_SIZE,