aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/st_fdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/st_fdma.c')
-rw-r--r--drivers/dma/st_fdma.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c
index 07c20aa2e955..bc7a1de3f29b 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -243,8 +243,7 @@ static struct st_fdma_desc *st_fdma_alloc_desc(struct st_fdma_chan *fchan,
243 struct st_fdma_desc *fdesc; 243 struct st_fdma_desc *fdesc;
244 int i; 244 int i;
245 245
246 fdesc = kzalloc(sizeof(*fdesc) + 246 fdesc = kzalloc(struct_size(fdesc, node, sg_len), GFP_NOWAIT);
247 sizeof(struct st_fdma_sw_node) * sg_len, GFP_NOWAIT);
248 if (!fdesc) 247 if (!fdesc)
249 return NULL; 248 return NULL;
250 249
@@ -294,8 +293,6 @@ static void st_fdma_free_chan_res(struct dma_chan *chan)
294 struct rproc *rproc = fchan->fdev->slim_rproc->rproc; 293 struct rproc *rproc = fchan->fdev->slim_rproc->rproc;
295 unsigned long flags; 294 unsigned long flags;
296 295
297 LIST_HEAD(head);
298
299 dev_dbg(fchan->fdev->dev, "%s: freeing chan:%d\n", 296 dev_dbg(fchan->fdev->dev, "%s: freeing chan:%d\n",
300 __func__, fchan->vchan.chan.chan_id); 297 __func__, fchan->vchan.chan.chan_id);
301 298
@@ -626,7 +623,6 @@ static void st_fdma_issue_pending(struct dma_chan *chan)
626static int st_fdma_pause(struct dma_chan *chan) 623static int st_fdma_pause(struct dma_chan *chan)
627{ 624{
628 unsigned long flags; 625 unsigned long flags;
629 LIST_HEAD(head);
630 struct st_fdma_chan *fchan = to_st_fdma_chan(chan); 626 struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
631 int ch_id = fchan->vchan.chan.chan_id; 627 int ch_id = fchan->vchan.chan.chan_id;
632 unsigned long cmd = FDMA_CMD_PAUSE(ch_id); 628 unsigned long cmd = FDMA_CMD_PAUSE(ch_id);