spi: sunplus-sp7021: use devm_reset_control_get_exclusive_deasserted()
Subsystems (2)
PATCH 1/1 spi: sunplus-sp7021: use devm_reset_control_get_exclusive_deasserted()
Use devm_reset_control_get_exclusive_deasserted() to replace the explicit reset acquisition, deassertion, and cleanup action registered with devm_add_action_or_reset().
This simplifies reset handling and removes the custom reset assertion callback while preserving reset assertion during cleanup.
--- drivers/spi/spi-sunplus-sp7021.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-)
drivers/spi/spi-sunplus-sp7021.c +3 -15
@@ -393,11 +393,6 @@ static int sp7021_spi_target_transfer_one(struct spi_controller *ctlr, struct spreturn ret; } -static void sp7021_spi_reset_control_assert (void *data) -{ -reset_control_assert (data); -} -static int sp7021_spi_controller_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -463,17 +458,10 @@ static int sp7021_spi_controller_probe(struct platform_device *pdev)if (IS_ERR (pspim->spi_clk))return dev_err_probe (dev,PTR_ERR (pspim->spi_clk),"clk get fail\n" ); - pspim->rstc =devm_reset_control_get_exclusive (dev,NULL ); + pspim->rstc =devm_reset_control_get_exclusive_deasserted (dev,NULL );if (IS_ERR (pspim->rstc)) -return dev_err_probe (dev,PTR_ERR (pspim->rstc),"rst get fail\n" ); - - ret =reset_control_deassert (pspim->rstc); -if (ret) -return dev_err_probe (dev, ret,"failed to deassert reset\n" ); - - ret =devm_add_action_or_reset (dev, sp7021_spi_reset_control_assert, pspim->rstc); -if (ret) -return ret; +return dev_err_probe (dev,PTR_ERR (pspim->rstc), +"failed to get and deassert reset\n" ); ret =devm_request_irq (dev, pspim->m_irq, sp7021_spi_host_irq,IRQF_TRIGGER_RISING , pdev->name, pspim);
---
base-commit: 793807ca13bf3072fc6d16ce6d90e9ab9beff2a5
change-id: 20261114-sunplus-reset-cleanup-6f05470b018e
Best regards,
Signature · 1 line
Felix Gu <[email protected]>
Quoted 8 lines · Felix Gu
Use
devm_reset_control_get_exclusive_deasserted()to replace the explicit reset acquisition, deassertion, and cleanup action registered withdevm_add_action_or_reset().This simplifies reset handling and removes the custom reset assertion callback while preserving reset assertion during cleanup.
Signed-off-by Felix Gu <[email protected]>
regards
Philipp
Mark Brown
maintainerQuoted 1 line · Felix Gu
spi: sunplus-sp7021: use
devm_reset_control_get_exclusive_deasserted()
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.5
Thanks!
[1/1] spi: sunplus-sp7021: use devm_reset_control_get_exclusive_deasserted()
https://git.kernel.org/broonie/spi/c/86478099f8c1
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark