i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled

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

 



From: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>

commit 18599e93e4e814ce146186026c6abf83c14d5798 upstream.

It is not valid to call pm_runtime_set_suspended() for devices
with runtime PM enabled because it returns -EAGAIN if it is enabled
already and working. So, call pm_runtime_disable() before to fix it.

Cc: stable@xxxxxxxxxxxxxxx # v5.17
Fixes: 05be23ef78f7 ("i3c: master: svc: add runtime pm support")
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20240930091913.2545510-1-ruanjinjie@xxxxxxxxxx
Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/i3c/master/svc-i3c-master.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1639,8 +1639,8 @@ static int svc_i3c_master_probe(struct p
 rpm_disable:
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	pm_runtime_put_noidle(&pdev->dev);
-	pm_runtime_set_suspended(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
+	pm_runtime_set_suspended(&pdev->dev);
 
 err_disable_clks:
 	svc_i3c_master_unprepare_clks(master);


Patches currently in stable-queue which might be from ruanjinjie@xxxxxxxxxx are

queue-6.1/drm-imx-ipuv3-use-irqf_no_autoen-flag-in-request_irq.patch
queue-6.1/cpufreq-cppc-fix-possible-null-ptr-deref-for-cpufreq.patch
queue-6.1/apparmor-test-fix-memory-leak-for-aa_unpack_strdup.patch
queue-6.1/mfd-tps65010-use-irqf_no_autoen-flag-in-request_irq-.patch
queue-6.1/cpufreq-cppc-fix-possible-null-ptr-deref-for-cppc_ge.patch
queue-6.1/spi-spi-fsl-lpspi-use-irqf_no_autoen-flag-in-request.patch
queue-6.1/media-amphion-fix-pm_runtime_set_suspended-with-runtime-pm-enabled.patch
queue-6.1/media-gspca-ov534-ov772x-fix-off-by-one-error-in-set_frame_rate.patch
queue-6.1/rtc-st-lpc-use-irqf_no_autoen-flag-in-request_irq.patch
queue-6.1/cpufreq-cppc-fix-wrong-return-value-in-cppc_get_cpu_.patch
queue-6.1/cpufreq-mediatek-hw-fix-wrong-return-value-in-mtk_cpufreq_get_cpu_power.patch
queue-6.1/wifi-mwifiex-use-irqf_no_autoen-flag-in-request_irq.patch
queue-6.1/drm-imx-dcss-use-irqf_no_autoen-flag-in-request_irq.patch
queue-6.1/drm-msm-adreno-use-irqf_no_autoen-flag-in-request_ir.patch
queue-6.1/media-venus-fix-pm_runtime_set_suspended-with-runtime-pm-enabled.patch
queue-6.1/i3c-master-svc-fix-pm_runtime_set_suspended-with-runtime-pm-enabled.patch
queue-6.1/media-i2c-dw9768-fix-pm_runtime_set_suspended-with-runtime-pm-enabled.patch
queue-6.1/cpufreq-cppc-fix-wrong-return-value-in-cppc_get_cpu_.patch-30306
queue-6.1/misc-apds990x-fix-missing-pm_runtime_disable.patch
queue-6.1/wifi-p54-use-irqf_no_autoen-flag-in-request_irq.patch
queue-6.1/spi-zynqmp-gqspi-undo-runtime-pm-changes-at-driver-e.patch
queue-6.1/soc-ti-smartreflex-use-irqf_no_autoen-flag-in-reques.patch




[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