* [PATCH linux-next] phy: mapphone-mdm6600:using the pm_runtime_resume_and_get to simplify the code
@ 2022-08-03 6:17 ` cgel.zte
0 siblings, 0 replies; 2+ messages in thread
From: cgel.zte @ 2022-08-03 6:17 UTC (permalink / raw)
To: linux-phy; +Cc: kishon, linux-kernel, ye xingchen, Zeal Robot
From: ye xingchen <ye.xingchen@zte.com.cn>
Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync
and pm_runtime_put_noidle.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/phy/motorola/phy-mapphone-mdm6600.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index 3cd4d51c247c..c1a1b8b0a13b 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -253,9 +253,8 @@ static irqreturn_t phy_mdm6600_wakeirq_thread(int irq, void *data)
return IRQ_NONE;
dev_dbg(ddata->dev, "OOB wake on mode_gpio1: %i\n", wakeup);
- error = pm_runtime_get_sync(ddata->dev);
+ error = pm_runtime_resume_and_get(ddata->dev);
if (error < 0) {
- pm_runtime_put_noidle(ddata->dev);
return IRQ_NONE;
}
@@ -601,10 +600,9 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
pm_runtime_set_autosuspend_delay(ddata->dev,
MDM6600_MODEM_IDLE_DELAY_MS);
pm_runtime_enable(ddata->dev);
- error = pm_runtime_get_sync(ddata->dev);
+ error = pm_runtime_resume_and_get(ddata->dev);
if (error < 0) {
dev_warn(ddata->dev, "failed to wake modem: %i\n", error);
- pm_runtime_put_noidle(ddata->dev);
goto cleanup;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH linux-next] phy: mapphone-mdm6600:using the pm_runtime_resume_and_get to simplify the code
@ 2022-08-03 6:17 ` cgel.zte
0 siblings, 0 replies; 2+ messages in thread
From: cgel.zte @ 2022-08-03 6:17 UTC (permalink / raw)
To: linux-phy; +Cc: kishon, linux-kernel, ye xingchen, Zeal Robot
From: ye xingchen <ye.xingchen@zte.com.cn>
Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync
and pm_runtime_put_noidle.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/phy/motorola/phy-mapphone-mdm6600.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index 3cd4d51c247c..c1a1b8b0a13b 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -253,9 +253,8 @@ static irqreturn_t phy_mdm6600_wakeirq_thread(int irq, void *data)
return IRQ_NONE;
dev_dbg(ddata->dev, "OOB wake on mode_gpio1: %i\n", wakeup);
- error = pm_runtime_get_sync(ddata->dev);
+ error = pm_runtime_resume_and_get(ddata->dev);
if (error < 0) {
- pm_runtime_put_noidle(ddata->dev);
return IRQ_NONE;
}
@@ -601,10 +600,9 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
pm_runtime_set_autosuspend_delay(ddata->dev,
MDM6600_MODEM_IDLE_DELAY_MS);
pm_runtime_enable(ddata->dev);
- error = pm_runtime_get_sync(ddata->dev);
+ error = pm_runtime_resume_and_get(ddata->dev);
if (error < 0) {
dev_warn(ddata->dev, "failed to wake modem: %i\n", error);
- pm_runtime_put_noidle(ddata->dev);
goto cleanup;
}
--
2.25.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-03 6:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 6:17 [PATCH linux-next] phy: mapphone-mdm6600:using the pm_runtime_resume_and_get to simplify the code cgel.zte
2022-08-03 6:17 ` cgel.zte
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.