mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: axi-spi-engine: remove platform_set_drvdata()
@ 2024-06-26 19:45 David Lechner
  2024-06-27  5:39 ` Nuno Sá
  2024-06-27 13:10 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: David Lechner @ 2024-06-26 19:45 UTC (permalink / raw)
  To: Mark Brown
  Cc: David Lechner, Michael Hennerich, Nuno Sá, linux-spi, linux-kernel

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(-)

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[] = {

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: axi-spi-engine: remove platform_set_drvdata()
  2024-06-26 19:45 [PATCH] spi: axi-spi-engine: remove platform_set_drvdata() David Lechner
@ 2024-06-27  5:39 ` Nuno Sá
  2024-06-27 13:10 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Nuno Sá @ 2024-06-27  5:39 UTC (permalink / raw)
  To: David Lechner, Mark Brown
  Cc: Michael Hennerich, Nuno Sá, linux-spi, linux-kernel

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>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: axi-spi-engine: remove platform_set_drvdata()
  2024-06-26 19:45 [PATCH] spi: axi-spi-engine: remove platform_set_drvdata() David Lechner
  2024-06-27  5:39 ` Nuno Sá
@ 2024-06-27 13:10 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-06-27 13:10 UTC (permalink / raw)
  To: David Lechner; +Cc: Michael Hennerich, Nuno Sá, linux-spi, linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-27 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-26 19:45 [PATCH] spi: axi-spi-engine: remove platform_set_drvdata() David Lechner
2024-06-27  5:39 ` Nuno Sá
2024-06-27 13:10 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®