* [PATCH linux-next] mtd: rawnand: gpmi: using the pm_runtime_resume_and_get to simplify the code
@ 2022-08-01 2:37 cgel.zte
0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2022-08-01 2:37 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-mtd, 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/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index 93da23682d86..0e7da90d6559 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -2504,9 +2504,8 @@ static int gpmi_nfc_exec_op(struct nand_chip *chip,
for (i = 0; i < GPMI_MAX_TRANSFERS; i++)
this->transfers[i].direction = DMA_NONE;
- ret = pm_runtime_get_sync(this->dev);
+ ret = pm_runtime_resume_and_get(this->dev);
if (ret < 0) {
- pm_runtime_put_noidle(this->dev);
return ret;
}
--
2.25.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-01 2:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01 2:37 [PATCH linux-next] mtd: rawnand: gpmi: using the pm_runtime_resume_and_get to simplify the code cgel.zte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).