Commit 00c4747a authored by Allen Pais's avatar Allen Pais Committed by Vinod Koul
Browse files

dmaengine: qcom: 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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200831103542.305571-23-allen.lkml@gmail.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 7f828176
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1074,9 +1074,9 @@ static void bam_start_dma(struct bam_chan *bchan)
 *
 * Sets up next DMA operation and then processes all completed transactions
 */
static void dma_tasklet(unsigned long data)
static void dma_tasklet(struct tasklet_struct *t)
{
	struct bam_device *bdev = (struct bam_device *)data;
	struct bam_device *bdev = from_tasklet(bdev, t, task);
	struct bam_chan *bchan;
	unsigned long flags;
	unsigned int i;
@@ -1292,7 +1292,7 @@ static int bam_dma_probe(struct platform_device *pdev)
	if (ret)
		goto err_disable_clk;

	tasklet_init(&bdev->task, dma_tasklet, (unsigned long)bdev);
	tasklet_setup(&bdev->task, dma_tasklet);

	bdev->channels = devm_kcalloc(bdev->dev, bdev->num_channels,
				sizeof(*bdev->channels), GFP_KERNEL);
+3 −3
Original line number Diff line number Diff line
@@ -224,9 +224,9 @@ static int hidma_chan_init(struct hidma_dev *dmadev, u32 dma_sig)
	return 0;
}

static void hidma_issue_task(unsigned long arg)
static void hidma_issue_task(struct tasklet_struct *t)
{
	struct hidma_dev *dmadev = (struct hidma_dev *)arg;
	struct hidma_dev *dmadev = from_tasklet(dmadev, t, task);

	pm_runtime_get_sync(dmadev->ddev.dev);
	hidma_ll_start(dmadev->lldev);
@@ -885,7 +885,7 @@ static int hidma_probe(struct platform_device *pdev)
		goto uninit;

	dmadev->irq = chirq;
	tasklet_init(&dmadev->task, hidma_issue_task, (unsigned long)dmadev);
	tasklet_setup(&dmadev->task, hidma_issue_task);
	hidma_debug_init(dmadev);
	hidma_sysfs_init(dmadev);
	dev_info(&pdev->dev, "HI-DMA engine driver registration complete\n");
+3 −3
Original line number Diff line number Diff line
@@ -173,9 +173,9 @@ int hidma_ll_request(struct hidma_lldev *lldev, u32 sig, const char *dev_name,
/*
 * Multiple TREs may be queued and waiting in the pending queue.
 */
static void hidma_ll_tre_complete(unsigned long arg)
static void hidma_ll_tre_complete(struct tasklet_struct *t)
{
	struct hidma_lldev *lldev = (struct hidma_lldev *)arg;
	struct hidma_lldev *lldev = from_tasklet(lldev, t, task);
	struct hidma_tre *tre;

	while (kfifo_out(&lldev->handoff_fifo, &tre, 1)) {
@@ -792,7 +792,7 @@ struct hidma_lldev *hidma_ll_init(struct device *dev, u32 nr_tres,
		return NULL;

	spin_lock_init(&lldev->lock);
	tasklet_init(&lldev->task, hidma_ll_tre_complete, (unsigned long)lldev);
	tasklet_setup(&lldev->task, hidma_ll_tre_complete);
	lldev->initialized = 1;
	writel(ENABLE_IRQS, lldev->evca + HIDMA_EVCA_IRQ_EN_REG);
	return lldev;