mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
dmaengine: mmp: convert tasklets to use new tasklet_setup() API
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Link: https://lore.kernel.org/r/20200831103542.305571-15-allen.lkml@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
80ef88693e
commit
77a4f4f74e
@ -873,9 +873,9 @@ static void mmp_pdma_issue_pending(struct dma_chan *dchan)
|
||||
* Do call back
|
||||
* Start pending list
|
||||
*/
|
||||
static void dma_do_tasklet(unsigned long data)
|
||||
static void dma_do_tasklet(struct tasklet_struct *t)
|
||||
{
|
||||
struct mmp_pdma_chan *chan = (struct mmp_pdma_chan *)data;
|
||||
struct mmp_pdma_chan *chan = from_tasklet(chan, t, tasklet);
|
||||
struct mmp_pdma_desc_sw *desc, *_desc;
|
||||
LIST_HEAD(chain_cleanup);
|
||||
unsigned long flags;
|
||||
@ -993,7 +993,7 @@ static int mmp_pdma_chan_init(struct mmp_pdma_device *pdev, int idx, int irq)
|
||||
spin_lock_init(&chan->desc_lock);
|
||||
chan->dev = pdev->dev;
|
||||
chan->chan.device = &pdev->device;
|
||||
tasklet_init(&chan->tasklet, dma_do_tasklet, (unsigned long)chan);
|
||||
tasklet_setup(&chan->tasklet, dma_do_tasklet);
|
||||
INIT_LIST_HEAD(&chan->chain_pending);
|
||||
INIT_LIST_HEAD(&chan->chain_running);
|
||||
|
||||
|
@ -346,9 +346,9 @@ static irqreturn_t mmp_tdma_int_handler(int irq, void *dev_id)
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
static void dma_do_tasklet(unsigned long data)
|
||||
static void dma_do_tasklet(struct tasklet_struct *t)
|
||||
{
|
||||
struct mmp_tdma_chan *tdmac = (struct mmp_tdma_chan *)data;
|
||||
struct mmp_tdma_chan *tdmac = from_tasklet(tdmac, t, tasklet);
|
||||
|
||||
dmaengine_desc_get_callback_invoke(&tdmac->desc, NULL);
|
||||
}
|
||||
@ -586,7 +586,7 @@ static int mmp_tdma_chan_init(struct mmp_tdma_device *tdev,
|
||||
tdmac->pool = pool;
|
||||
tdmac->status = DMA_COMPLETE;
|
||||
tdev->tdmac[tdmac->idx] = tdmac;
|
||||
tasklet_init(&tdmac->tasklet, dma_do_tasklet, (unsigned long)tdmac);
|
||||
tasklet_setup(&tdmac->tasklet, dma_do_tasklet);
|
||||
|
||||
/* add the channel to tdma_chan list */
|
||||
list_add_tail(&tdmac->chan.device_node,
|
||||
|
Loading…
Reference in New Issue
Block a user