diff options
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 5274a0704d96..e9f0101d92fa 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -255,7 +255,7 @@ enum pl330_byteswap { static unsigned cmd_line; #define PL330_DBGCMD_DUMP(off, x...) do { \ printk("%x:", cmd_line); \ - printk(x); \ + printk(KERN_CONT x); \ cmd_line += off; \ } while (0) #define PL330_DBGMC_START(addr) (cmd_line = addr) @@ -460,9 +460,6 @@ struct pl330_dmac { /* DMA-Engine Device */ struct dma_device ddma; - /* Holds info about sg limitations */ - struct device_dma_parameters dma_parms; - /* Pool of descriptors available for the DMAC's channels */ struct list_head desc_pool; /* To protect desc_pool manipulation */ @@ -1576,9 +1573,9 @@ static void dma_pl330_rqcb(struct dma_pl330_desc *desc, enum pl330_op_err err) tasklet_schedule(&pch->task); } -static void pl330_dotask(unsigned long data) +static void pl330_dotask(struct tasklet_struct *t) { - struct pl330_dmac *pl330 = (struct pl330_dmac *) data; + struct pl330_dmac *pl330 = from_tasklet(pl330, t, tasks); unsigned long flags; int i; @@ -1982,7 +1979,7 @@ static int pl330_add(struct pl330_dmac *pl330) return ret; } - tasklet_init(&pl330->tasks, pl330_dotask, (unsigned long) pl330); + tasklet_setup(&pl330->tasks, pl330_dotask); pl330->state = INIT; @@ -2065,9 +2062,9 @@ static inline void fill_queue(struct dma_pl330_chan *pch) } } -static void pl330_tasklet(unsigned long data) +static void pl330_tasklet(struct tasklet_struct *t) { - struct dma_pl330_chan *pch = (struct dma_pl330_chan *)data; + struct dma_pl330_chan *pch = from_tasklet(pch, t, task); struct dma_pl330_desc *desc, *_dt; unsigned long flags; bool power_down = false; @@ -2175,7 +2172,7 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan) return -ENOMEM; } - tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch); + tasklet_setup(&pch->task, pl330_tasklet); spin_unlock_irqrestore(&pl330->lock, flags); @@ -2487,7 +2484,7 @@ static void pl330_issue_pending(struct dma_chan *chan) list_splice_tail_init(&pch->submitted_list, &pch->work_list); spin_unlock_irqrestore(&pch->lock, flags); - pl330_tasklet((unsigned long)pch); + pl330_tasklet(&pch->task); } /* @@ -3034,9 +3031,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pl330->rstc = devm_reset_control_get_optional(&adev->dev, "dma"); if (IS_ERR(pl330->rstc)) { - if (PTR_ERR(pl330->rstc) != -EPROBE_DEFER) - dev_err(&adev->dev, "Failed to get reset!\n"); - return PTR_ERR(pl330->rstc); + return dev_err_probe(&adev->dev, PTR_ERR(pl330->rstc), "Failed to get reset!\n"); } else { ret = reset_control_deassert(pl330->rstc); if (ret) { @@ -3047,9 +3042,8 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pl330->rstc_ocp = devm_reset_control_get_optional(&adev->dev, "dma-ocp"); if (IS_ERR(pl330->rstc_ocp)) { - if (PTR_ERR(pl330->rstc_ocp) != -EPROBE_DEFER) - dev_err(&adev->dev, "Failed to get OCP reset!\n"); - return PTR_ERR(pl330->rstc_ocp); + return dev_err_probe(&adev->dev, PTR_ERR(pl330->rstc_ocp), + "Failed to get OCP reset!\n"); } else { ret = reset_control_deassert(pl330->rstc_ocp); if (ret) { @@ -3154,8 +3148,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) } } - adev->dev.dma_parms = &pl330->dma_parms; - /* * This is the limit for transfers with a buswidth of 1, larger * buswidths will have larger limits. |