diff options
author | Lukas Wunner <lukas@wunner.de> | 2020-05-04 14:12:03 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-04 19:18:47 +0300 |
commit | 4332ea8f40c80d51a534f194291bf3b7738a7beb (patch) | |
tree | 74a0fae22407941bd77bf68ca99ce83d2f9acad5 /drivers/spi/spi-amd.c | |
parent | cc17fbec2e785926dafce65d014f8301847dff40 (diff) | |
download | linux-4332ea8f40c80d51a534f194291bf3b7738a7beb.tar.xz |
spi: amd: Drop duplicate driver data assignments
The AMD SPI driver calls platform_set_drvdata() on probe even though
it's already been set by __spi_alloc_controller(). Likewise, it calls
platform_set_drvdata() on remove even though it's going to be set by
__device_release_driver(). Drop the duplicate assignments.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/499f8ad4759c2ff0f586e0459fb9a293faecff6d.1588590210.git.lukas@wunner.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-amd.c')
-rw-r--r-- | drivers/spi/spi-amd.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c index a4248b97b67e..d3e3516ef957 100644 --- a/drivers/spi/spi-amd.c +++ b/drivers/spi/spi-amd.c @@ -287,7 +287,6 @@ static int amd_spi_probe(struct platform_device *pdev) dev_err(dev, "error %d registering SPI controller\n", err); goto err_free_master; } - platform_set_drvdata(pdev, amd_spi); return 0; @@ -303,7 +302,6 @@ static int amd_spi_remove(struct platform_device *pdev) spi_unregister_master(amd_spi->master); spi_master_put(amd_spi->master); - platform_set_drvdata(pdev, NULL); return 0; } |