mailbox: mtk-cmdq: Add struct cmdq_pkt in struct cmdq_cb_data
Current client use 'struct cmdq_pkt' as callback data, so change 'void *data' to 'struct cmdq_pkt *pkt'. Keep data until client use pkt instead of data. 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:
Родитель
1b6b0ce224
Коммит
8ebc3b5aa4
|
@ -188,6 +188,7 @@ 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;
|
||||
data.pkt = task->pkt;
|
||||
if (cb->cb)
|
||||
cb->cb(data);
|
||||
|
||||
|
@ -456,6 +457,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
|
|||
list_entry) {
|
||||
data.sta = -ECONNABORTED;
|
||||
data.data = cb->data;
|
||||
data.pkt = task->pkt;
|
||||
cb = &task->pkt->async_cb;
|
||||
if (cb->cb)
|
||||
cb->cb(data);
|
||||
|
|
|
@ -68,6 +68,7 @@ enum cmdq_code {
|
|||
struct cmdq_cb_data {
|
||||
int sta;
|
||||
void *data;
|
||||
struct cmdq_pkt *pkt;
|
||||
};
|
||||
|
||||
typedef void (*cmdq_async_flush_cb)(struct cmdq_cb_data data);
|
||||
|
|
Загрузка…
Ссылка в новой задаче