aboutsummaryrefslogtreecommitdiff
path: root/drivers/dma/pl330.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r--drivers/dma/pl330.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 82a9fe88ad54..25ba84b18704 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1887,8 +1887,7 @@ static int dmac_alloc_threads(struct pl330_dmac *pl330)
int i;
/* Allocate 1 Manager and 'chans' Channel threads */
- pl330->channels = kcalloc(1 + chans, sizeof(*thrd),
- GFP_KERNEL);
+ pl330->channels = kzalloc_objs(*thrd, 1 + chans);
if (!pl330->channels)
return -ENOMEM;
@@ -2133,10 +2132,8 @@ static void pl330_tasklet(struct tasklet_struct *t)
spin_unlock_irqrestore(&pch->lock, flags);
/* If work list empty, power down */
- if (power_down) {
- pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
+ if (power_down)
pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
- }
}
static struct dma_chan *of_dma_pl330_xlate(struct of_phandle_args *dma_spec,
@@ -2313,7 +2310,6 @@ static int pl330_terminate_all(struct dma_chan *chan)
list_splice_tail_init(&pch->work_list, &pl330->desc_pool);
list_splice_tail_init(&pch->completed_list, &pl330->desc_pool);
spin_unlock_irqrestore(&pch->lock, flags);
- pm_runtime_mark_last_busy(pl330->ddma.dev);
if (power_down)
pm_runtime_put_autosuspend(pl330->ddma.dev);
pm_runtime_put_autosuspend(pl330->ddma.dev);
@@ -2347,7 +2343,6 @@ static int pl330_pause(struct dma_chan *chan)
desc->status = PAUSED;
}
spin_unlock_irqrestore(&pch->lock, flags);
- pm_runtime_mark_last_busy(pl330->ddma.dev);
pm_runtime_put_autosuspend(pl330->ddma.dev);
return 0;
@@ -2371,7 +2366,6 @@ static void pl330_free_chan_resources(struct dma_chan *chan)
list_splice_tail_init(&pch->work_list, &pch->dmac->desc_pool);
spin_unlock_irqrestore(&pl330->lock, flags);
- pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
pl330_unprep_slave_fifo(pch);
}
@@ -2553,7 +2547,7 @@ static int add_desc(struct list_head *pool, spinlock_t *lock,
unsigned long flags;
int i;
- desc = kcalloc(count, sizeof(*desc), flg);
+ desc = kzalloc_objs(*desc, count, flg);
if (!desc)
return 0;
@@ -3098,7 +3092,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
pl330->num_peripherals = num_chan;
- pl330->peripherals = kcalloc(num_chan, sizeof(*pch), GFP_KERNEL);
+ pl330->peripherals = kzalloc_objs(*pch, num_chan);
if (!pl330->peripherals) {
ret = -ENOMEM;
goto probe_err2;
@@ -3176,7 +3170,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
pm_runtime_irq_safe(&adev->dev);
pm_runtime_use_autosuspend(&adev->dev);
pm_runtime_set_autosuspend_delay(&adev->dev, PL330_AUTOSUSPEND_DELAY);
- pm_runtime_mark_last_busy(&adev->dev);
pm_runtime_put_autosuspend(&adev->dev);
return 0;