On Mon, Apr 29, 2024 at 11:13 AM Lorenzo Bianconi <lorenzo@xxxxxxxxxx> wrote: > > Introduce support for SPI-NAND driver of the Airoha NAND Flash Interface > found on Airoha ARM SoCs. FWIW, Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx> ... > +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