Commit 08fb6d8f authored by Sakari Ailus's avatar Sakari Ailus Committed by Jassi Brar
Browse files

mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()



pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarJassi Brar <jassisinghbrar@gmail.com>
parent a4123ffa
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -397,7 +397,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;
	}

@@ -447,7 +447,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;
}
@@ -495,7 +495,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan)
	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)
@@ -535,7 +535,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;

@@ -550,7 +550,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
		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;
}