mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 13:52:02 -04:00
mtd: rawnand: gpmi: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using the newest pm_runtime_resume_and_get is more appropriate for simplifing code here. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220922150654.117568-1-zhangqilong3@huawei.com
This commit is contained in:
committed by
Miquel Raynal
parent
47c3697e25
commit
78e2d5410a
@@ -148,11 +148,9 @@ static int gpmi_init(struct gpmi_nand_data *this)
|
||||
struct resources *r = &this->resources;
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(this->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(this->dev);
|
||||
ret = pm_runtime_resume_and_get(this->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = gpmi_reset_block(r->gpmi_regs, false);
|
||||
if (ret)
|
||||
@@ -2504,11 +2502,9 @@ 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);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(this->dev);
|
||||
ret = pm_runtime_resume_and_get(this->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* This driver currently supports only one NAND chip. Plus, dies share
|
||||
|
||||
Reference in New Issue
Block a user