aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-12-20 11:06:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2024-12-20 11:06:25 -0800
commit5127e1495b04c4516f3d9ab5bd6f241873793245 (patch)
tree80422c4ce98c5005f6850f2ece92bac6362849cf
parentb648264cd490c811a9a6b43bd478e1656b44b447 (diff)
parent7f9a1eed1ad8b274ed9163a02cef891a90427237 (diff)
downloadlinux-5127e1495b04c4516f3d9ab5bd6f241873793245.tar.gz
linux-5127e1495b04c4516f3d9ab5bd6f241873793245.tar.bz2
linux-5127e1495b04c4516f3d9ab5bd6f241873793245.zip
Merge tag 'spi-fix-v6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fix from Mark Brown: "A fix for the remove path of the Rockchip driver, the code was just clearly and obviously wrong" * tag 'spi-fix-v6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: rockchip-sfc: Fix error in remove progress
-rw-r--r--drivers/spi/spi-rockchip-sfc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c
index 69d0f2175568..70bbb459caa4 100644
--- a/drivers/spi/spi-rockchip-sfc.c
+++ b/drivers/spi/spi-rockchip-sfc.c
@@ -182,6 +182,7 @@ struct rockchip_sfc {
bool use_dma;
u32 max_iosize;
u16 version;
+ struct spi_controller *host;
};
static int rockchip_sfc_reset(struct rockchip_sfc *sfc)
@@ -574,6 +575,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
sfc = spi_controller_get_devdata(host);
sfc->dev = dev;
+ sfc->host = host;
sfc->regbase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sfc->regbase))
@@ -651,8 +653,8 @@ err_hclk:
static void rockchip_sfc_remove(struct platform_device *pdev)
{
- struct spi_controller *host = platform_get_drvdata(pdev);
struct rockchip_sfc *sfc = platform_get_drvdata(pdev);
+ struct spi_controller *host = sfc->host;
spi_unregister_controller(host);