diff mbox series

spi: axi-spi-engine: remove platform_set_drvdata()

Message ID 20240626-spi-axi-spi-engine-remove-drvdata-v1-1-1752e372dd5d@baylibre.com (mailing list archive)
State Accepted
Commit 89c2657429c4822a2697077bbb3a8d126d826ced
Headers show
Series spi: axi-spi-engine: remove platform_set_drvdata() | expand

Commit Message

David Lechner June 26, 2024, 7:45 p.m. UTC
platform_get_drvdata() is never called in the AXI SPI Engine driver, so
platform_set_drvdata() is not needed. Remove it. This also lets us
avoid the final error check in the probe function.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
 drivers/spi/spi-axi-spi-engine.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)


---
base-commit: f66ed82666bc582434d57359d2d83d6f40c925e4
change-id: 20240626-spi-axi-spi-engine-remove-drvdata-cf390daaa2ab

Comments

Nuno Sá June 27, 2024, 5:39 a.m. UTC | #1
On Wed, 2024-06-26 at 14:45 -0500, David Lechner wrote:
> platform_get_drvdata() is never called in the AXI SPI Engine driver, so
> platform_set_drvdata() is not needed. Remove it. This also lets us
> avoid the final error check in the probe function.
> 
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Mark Brown June 27, 2024, 1:10 p.m. UTC | #2
On Wed, 26 Jun 2024 14:45:17 -0500, David Lechner wrote:
> platform_get_drvdata() is never called in the AXI SPI Engine driver, so
> platform_set_drvdata() is not needed. Remove it. This also lets us
> avoid the final error check in the probe function.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: axi-spi-engine: remove platform_set_drvdata()
      commit: 89c2657429c4822a2697077bbb3a8d126d826ced

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
diff mbox series

Patch

diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c
index 103a68bd4f19..447e5a962dee 100644
--- a/drivers/spi/spi-axi-spi-engine.c
+++ b/drivers/spi/spi-axi-spi-engine.c
@@ -700,13 +700,7 @@  static int spi_engine_probe(struct platform_device *pdev)
 	if (host->max_speed_hz == 0)
 		return dev_err_probe(&pdev->dev, -EINVAL, "spi_clk rate is 0");
 
-	ret = devm_spi_register_controller(&pdev->dev, host);
-	if (ret)
-		return ret;
-
-	platform_set_drvdata(pdev, host);
-
-	return 0;
+	return devm_spi_register_controller(&pdev->dev, host);
 }
 
 static const struct of_device_id spi_engine_match_table[] = {