spi: Fix for v6.13

A fix for the remove path of the Rockchip driver, the code was just
 clearly and obviously wrong.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmdlZn0ACgkQJNaLcl1U
 h9AVYQgAgXXbnZvzn7ObZRl6qcXVjEnU1dsZc6DoGSps2t06ICIy2BHekZ6rR0pR
 U2R0IRl7+p3wrN2Bz6gCBSell+uCAMLXouqDFRZZtc2/lMm/G5LhsOmYwMPazxzE
 9WlyNJE28DOkQpwXG9Mu0KR/0jNOGFx++LPQdSeoP435acWbqTZ2dfqyApIfj0z0
 rxHVeWjWbRiO7r+2luC/WfMK5CrkzgEx7H6iTA2tpJH88w9E6JBmB18ignUBJzx5
 VAtQxMqaGHN9i/ZzaZI2IMCWLrEB/oqKysK8nnjENRinbGyHjQZdAf7exNeaCJYe
 PlPhb2kNWzDtc0MxQvVaThHGbsRQqA==
 =t6L6
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-12-20 11:06:25 -08:00
commit 5127e1495b

View File

@ -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);