mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
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: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Link: https://lore.kernel.org/r/20200831103542.305571-23-allen.lkml@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
7f8281765f
commit
00c4747a2f
@ -1074,9 +1074,9 @@ static void bam_start_dma(struct bam_chan *bchan)
|
|||||||
*
|
*
|
||||||
* Sets up next DMA operation and then processes all completed transactions
|
* 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;
|
struct bam_chan *bchan;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
@ -1292,7 +1292,7 @@ static int bam_dma_probe(struct platform_device *pdev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_disable_clk;
|
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,
|
bdev->channels = devm_kcalloc(bdev->dev, bdev->num_channels,
|
||||||
sizeof(*bdev->channels), GFP_KERNEL);
|
sizeof(*bdev->channels), GFP_KERNEL);
|
||||||
|
@ -224,9 +224,9 @@ static int hidma_chan_init(struct hidma_dev *dmadev, u32 dma_sig)
|
|||||||
return 0;
|
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);
|
pm_runtime_get_sync(dmadev->ddev.dev);
|
||||||
hidma_ll_start(dmadev->lldev);
|
hidma_ll_start(dmadev->lldev);
|
||||||
@ -885,7 +885,7 @@ static int hidma_probe(struct platform_device *pdev)
|
|||||||
goto uninit;
|
goto uninit;
|
||||||
|
|
||||||
dmadev->irq = chirq;
|
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_debug_init(dmadev);
|
||||||
hidma_sysfs_init(dmadev);
|
hidma_sysfs_init(dmadev);
|
||||||
dev_info(&pdev->dev, "HI-DMA engine driver registration complete\n");
|
dev_info(&pdev->dev, "HI-DMA engine driver registration complete\n");
|
||||||
|
@ -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.
|
* 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;
|
struct hidma_tre *tre;
|
||||||
|
|
||||||
while (kfifo_out(&lldev->handoff_fifo, &tre, 1)) {
|
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;
|
return NULL;
|
||||||
|
|
||||||
spin_lock_init(&lldev->lock);
|
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;
|
lldev->initialized = 1;
|
||||||
writel(ENABLE_IRQS, lldev->evca + HIDMA_EVCA_IRQ_EN_REG);
|
writel(ENABLE_IRQS, lldev->evca + HIDMA_EVCA_IRQ_EN_REG);
|
||||||
return lldev;
|
return lldev;
|
||||||
|
Loading…
Reference in New Issue
Block a user