[PATCH linux-next] mtd: rawnand: gpmi: using the pm_runtime_resume_and_get to simplify the code

cgel.zte@gmail.com posted 1 patch 3 years, 8 months ago
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH linux-next] mtd: rawnand: gpmi: using the pm_runtime_resume_and_get to simplify the code
Posted by cgel.zte@gmail.com 3 years, 8 months ago
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