mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 15:51:46 +00:00
mailbox: mtk-cmdq: Use mailbox rx_callback
rx_callback is a standard mailbox callback mechanism and could cover the function of proprietary cmdq_task_cb, so use the standard one instead of the proprietary one. But the client driver has already used cmdq_task_cb, so keep cmdq_task_cb until all client driver use rx_callback instead of cmdq_task_cb. Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Reviewed-by: Yongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
b3c0d72b09
commit
1b6b0ce224
@ -188,7 +188,10 @@ static void cmdq_task_exec_done(struct cmdq_task *task, int sta)
|
||||
WARN_ON(cb->cb == (cmdq_async_flush_cb)NULL);
|
||||
data.sta = sta;
|
||||
data.data = cb->data;
|
||||
cb->cb(data);
|
||||
if (cb->cb)
|
||||
cb->cb(data);
|
||||
|
||||
mbox_chan_received_data(task->thread->chan, &data);
|
||||
|
||||
list_del(&task->list_entry);
|
||||
}
|
||||
@ -451,12 +454,13 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
|
||||
|
||||
list_for_each_entry_safe(task, tmp, &thread->task_busy_list,
|
||||
list_entry) {
|
||||
data.sta = -ECONNABORTED;
|
||||
data.data = cb->data;
|
||||
cb = &task->pkt->async_cb;
|
||||
if (cb->cb) {
|
||||
data.sta = -ECONNABORTED;
|
||||
data.data = cb->data;
|
||||
if (cb->cb)
|
||||
cb->cb(data);
|
||||
}
|
||||
|
||||
mbox_chan_received_data(task->thread->chan, &data);
|
||||
list_del(&task->list_entry);
|
||||
kfree(task);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user