Patch "spi: spi-cadence: Fix missing spi_controller_is_target() check" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    spi: spi-cadence: Fix missing spi_controller_is_target() check

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-spi-cadence-fix-missing-spi_controller_is_target.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 415cfa13a3671157c9de77ef94091a485d196b57
Author: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
Date:   Mon Sep 23 12:00:15 2024 +0800

    spi: spi-cadence: Fix missing spi_controller_is_target() check
    
    [ Upstream commit 3eae4a916fc0eb6f85b5d399e10335dbd24dd765 ]
    
    The spi_controller_is_target() check is missing for pm_runtime_disable()
    in cdns_spi_remove(), add it.
    
    Fixes: b1b90514eaa3 ("spi: spi-cadence: Add support for Slave mode")
    Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
    Link: https://patch.msgid.link/20240923040015.3009329-4-ruanjinjie@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 316da99f798c8..81edf0a3ddf84 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -688,8 +688,10 @@ static void cdns_spi_remove(struct platform_device *pdev)
 
 	cdns_spi_write(xspi, CDNS_SPI_ER, CDNS_SPI_ER_DISABLE);
 
-	pm_runtime_disable(&pdev->dev);
-	pm_runtime_set_suspended(&pdev->dev);
+	if (!spi_controller_is_target(ctlr)) {
+		pm_runtime_disable(&pdev->dev);
+		pm_runtime_set_suspended(&pdev->dev);
+	}
 
 	spi_unregister_controller(ctlr);
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux