Skip to content

Commit b586fbb

Browse files
Sakari Ailusgregkh
authored andcommitted
mailbox: mtk-cmdq: Switch to pm_runtime_put_autosuspend()
[ Upstream commit 472f8a3 ] __pm_runtime_put_autosuspend() was meant to be used by callers that needed to put the Runtime PM usage_count without marking the device's last busy timestamp. It was however seen that the Runtime PM autosuspend related functions should include that call. Thus switch the driver to use pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Jassi Brar <[email protected]> Stable-dep-of: 3f39f56 ("mailbox: mtk-cmdq: Remove pm_runtime APIs from cmdq_mbox_send_data()") Signed-off-by: Sasha Levin <[email protected]>
1 parent 2a2b88a commit b586fbb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/mailbox/mtk-cmdq-mailbox.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
390390

391391
task = kzalloc(sizeof(*task), GFP_ATOMIC);
392392
if (!task) {
393-
__pm_runtime_put_autosuspend(cmdq->mbox.dev);
393+
pm_runtime_put_autosuspend(cmdq->mbox.dev);
394394
return -ENOMEM;
395395
}
396396

@@ -440,7 +440,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
440440
list_move_tail(&task->list_entry, &thread->task_busy_list);
441441

442442
pm_runtime_mark_last_busy(cmdq->mbox.dev);
443-
__pm_runtime_put_autosuspend(cmdq->mbox.dev);
443+
pm_runtime_put_autosuspend(cmdq->mbox.dev);
444444

445445
return 0;
446446
}
@@ -488,7 +488,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan)
488488
spin_unlock_irqrestore(&thread->chan->lock, flags);
489489

490490
pm_runtime_mark_last_busy(cmdq->mbox.dev);
491-
__pm_runtime_put_autosuspend(cmdq->mbox.dev);
491+
pm_runtime_put_autosuspend(cmdq->mbox.dev);
492492
}
493493

494494
static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
@@ -528,7 +528,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
528528
out:
529529
spin_unlock_irqrestore(&thread->chan->lock, flags);
530530
pm_runtime_mark_last_busy(cmdq->mbox.dev);
531-
__pm_runtime_put_autosuspend(cmdq->mbox.dev);
531+
pm_runtime_put_autosuspend(cmdq->mbox.dev);
532532

533533
return 0;
534534

@@ -543,7 +543,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
543543
return -EFAULT;
544544
}
545545
pm_runtime_mark_last_busy(cmdq->mbox.dev);
546-
__pm_runtime_put_autosuspend(cmdq->mbox.dev);
546+
pm_runtime_put_autosuspend(cmdq->mbox.dev);
547547
return 0;
548548
}
549549

0 commit comments

Comments
 (0)