[PATCH v5 3/3] spi: airoha: add SPI-NAND Flash controller driver
Andy Shevchenko
andy.shevchenko at gmail.com
Mon Apr 29 02:21:58 PDT 2024
On Mon, Apr 29, 2024 at 11:13 AM Lorenzo Bianconi <lorenzo at kernel.org> wrote:
>
> Introduce support for SPI-NAND driver of the Airoha NAND Flash Interface
> found on Airoha ARM SoCs.
FWIW,
Reviewed-by: Andy Shevchenko <andy at kernel.org>
...
> +static void airoha_snand_cleanup(struct spi_device *spi)
> +{
> + struct airoha_snand_dev *as_dev = spi_get_ctldata(spi);
> + struct airoha_snand_ctrl *as_ctrl;
> +
> + as_ctrl = spi_controller_get_devdata(spi->controller);
You may do it on one line above (the same way as for as_dev).
Ditto for other similar cases around.
> + dma_unmap_single(as_ctrl->dev, as_dev->dma_addr,
> + as_dev->buf_len, DMA_BIDIRECTIONAL);
> + spi_set_ctldata(spi, NULL);
> +}
...
> +static const struct of_device_id airoha_snand_ids[] = {
> + { .compatible = "airoha,en7581-snand" },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, airoha_snand_ids);
No need to keep this block here, the first user is below the ->probe().
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list