Home
last modified time | relevance | path

Searched hist:"07 f1eb718db281c3e0cdb068ea7d73c30921a81c" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/spi/
H A Dspi-geni-qcom.cdiff 07f1eb718db281c3e0cdb068ea7d73c30921a81c Thu Sep 12 11:17:01 CEST 2024 Jinjie Ruan <ruanjinjie@huawei.com> spi: geni-qcom: Use devm functions to simplify code

Use devm_pm_runtime_enable(), devm_request_irq() and
devm_spi_register_controller() to simplify code.

And also register a callback spi_geni_release_dma_chan() with
devm_add_action_or_reset(), to release dma channel in both error
and device detach path, which can make sure the release sequence is
consistent with the original one.

1. Unregister spi controller.
2. Free the IRQ.
3. Free DMA chans
4. Disable runtime PM.

So the remove function can also be removed.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Suggested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240912091701.3720857-1-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>