Skip to content

Commit 5127e14

Browse files
committed
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
2 parents b648264 + 7f9a1ee commit 5127e14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/spi/spi-rockchip-sfc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ struct rockchip_sfc {
182182
bool use_dma;
183183
u32 max_iosize;
184184
u16 version;
185+
struct spi_controller *host;
185186
};
186187

187188
static int rockchip_sfc_reset(struct rockchip_sfc *sfc)
@@ -574,6 +575,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
574575

575576
sfc = spi_controller_get_devdata(host);
576577
sfc->dev = dev;
578+
sfc->host = host;
577579

578580
sfc->regbase = devm_platform_ioremap_resource(pdev, 0);
579581
if (IS_ERR(sfc->regbase))
@@ -651,8 +653,8 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
651653

652654
static void rockchip_sfc_remove(struct platform_device *pdev)
653655
{
654-
struct spi_controller *host = platform_get_drvdata(pdev);
655656
struct rockchip_sfc *sfc = platform_get_drvdata(pdev);
657+
struct spi_controller *host = sfc->host;
656658

657659
spi_unregister_controller(host);
658660

0 commit comments

Comments
 (0)