We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da2ef81 commit 5bc6bb6Copy full SHA for 5bc6bb6
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -148,6 +148,10 @@ static int gpmi_init(struct gpmi_nand_data *this)
148
struct resources *r = &this->resources;
149
int ret;
150
151
+ ret = pm_runtime_get_sync(this->dev);
152
+ if (ret < 0)
153
+ return ret;
154
+
155
ret = gpmi_reset_block(r->gpmi_regs, false);
156
if (ret)
157
goto err_out;
@@ -179,8 +183,9 @@ static int gpmi_init(struct gpmi_nand_data *this)
179
183
*/
180
184
writel(BM_GPMI_CTRL1_DECOUPLE_CS, r->gpmi_regs + HW_GPMI_CTRL1_SET);
181
185
182
- return 0;
186
err_out:
187
+ pm_runtime_mark_last_busy(this->dev);
188
+ pm_runtime_put_autosuspend(this->dev);
189
return ret;
190
}
191
0 commit comments