]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mailbox: mtk-cmdq: Switch to pm_runtime_put_autosuspend()
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 25 Jun 2025 08:15:01 +0000 (11:15 +0300)
committerJassi Brar <jassisinghbrar@gmail.com>
Wed, 6 Aug 2025 17:41:32 +0000 (12:41 -0500)
__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 <sakari.ailus@linux.intel.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
drivers/mailbox/mtk-cmdq-mailbox.c

index ab4e8d1954a16ecbef87ea9c0ad2dc1e54c0c5c1..532929916e998807a010b488701696a5efc531cb 100644 (file)
@@ -390,7 +390,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
 
        task = kzalloc(sizeof(*task), GFP_ATOMIC);
        if (!task) {
-               __pm_runtime_put_autosuspend(cmdq->mbox.dev);
+               pm_runtime_put_autosuspend(cmdq->mbox.dev);
                return -ENOMEM;
        }
 
@@ -440,7 +440,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
        list_move_tail(&task->list_entry, &thread->task_busy_list);
 
        pm_runtime_mark_last_busy(cmdq->mbox.dev);
-       __pm_runtime_put_autosuspend(cmdq->mbox.dev);
+       pm_runtime_put_autosuspend(cmdq->mbox.dev);
 
        return 0;
 }
@@ -488,7 +488,7 @@ done:
        spin_unlock_irqrestore(&thread->chan->lock, flags);
 
        pm_runtime_mark_last_busy(cmdq->mbox.dev);
-       __pm_runtime_put_autosuspend(cmdq->mbox.dev);
+       pm_runtime_put_autosuspend(cmdq->mbox.dev);
 }
 
 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)
 out:
        spin_unlock_irqrestore(&thread->chan->lock, flags);
        pm_runtime_mark_last_busy(cmdq->mbox.dev);
-       __pm_runtime_put_autosuspend(cmdq->mbox.dev);
+       pm_runtime_put_autosuspend(cmdq->mbox.dev);
 
        return 0;
 
@@ -543,7 +543,7 @@ wait:
                return -EFAULT;
        }
        pm_runtime_mark_last_busy(cmdq->mbox.dev);
-       __pm_runtime_put_autosuspend(cmdq->mbox.dev);
+       pm_runtime_put_autosuspend(cmdq->mbox.dev);
        return 0;
 }