spi: ar934x: Convert to devm_spi_register_controller()
PATCH 1/1 spi: ar934x: Convert to devm_spi_register_controller()
Switch to devm_spi_register_controller() and drop the unneeded .remove callback and dev_set_drvdata().
--- drivers/spi/spi-ar934x.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/spi/spi-ar934x.c +1 -12
@@ -197,23 +197,13 @@ static int ar934x_spi_probe(struct platform_device *pdev)SPI_BPW_MASK (16 ) |SPI_BPW_MASK (8 ); ctlr->num_chipselect =3 ; -dev_set_drvdata (&pdev->dev, ctlr); - sp =spi_controller_get_devdata (ctlr); sp->base = base; sp->clk = clk; sp->clk_freq =clk_get_rate (clk); sp->ctlr = ctlr; -return spi_register_controller (ctlr); -} - -static void ar934x_spi_remove (struct platform_device *pdev) -{ -struct spi_controller *ctlr; - - ctlr =dev_get_drvdata (&pdev->dev); -spi_unregister_controller (ctlr); +return devm_spi_register_controller (&pdev->dev, ctlr); }static struct platform_driver ar934x_spi_driver = {
@@ -222,7 +212,6 @@ static struct platform_driver ar934x_spi_driver = { .of_match_table = ar934x_spi_match, }, .probe = ar934x_spi_probe, - .remove = ar934x_spi_remove, };module_platform_driver (ar934x_spi_driver);
---
base-commit: 9d80aa4617b32f5054c5aa471d06b66704854935
change-id: 20260907-ar934x-1f451bec828d
Best regards,
Signature · 1 line
Felix Gu <[email protected]>
Mark Brown
maintainerQuoted 1 line · Felix Gu
spi: ar934x: Convert to
devm_spi_register_controller()
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4
Thanks!
[1/1] spi: ar934x: Convert to devm_spi_register_controller()
https://git.kernel.org/broonie/spi/c/e95dac34dd57
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