Unverified Commit 07f1eb71 authored by Jinjie Ruan's avatar Jinjie Ruan Committed by Mark Brown
Browse files

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: default avatarDouglas Anderson <dianders@chromium.org>
Suggested-by: default avatarDoug Anderson <dianders@chromium.org>
Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240912091701.3720857-1-ruanjinjie@huawei.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f10d5208
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment