diff options
author | Fabio Baltieri <fabio.baltieri@linaro.org> | 2012-12-13 11:12:37 -0500 |
---|---|---|
committer | Fabio Baltieri <fabio.baltieri@linaro.org> | 2013-01-14 04:51:01 -0500 |
commit | f26e03ad2b50be50c98f8ecb1fd9dbdf94db91ab (patch) | |
tree | ee73368ed2a176ae6e804e02cd5f77f586ccbde9 /drivers/dma/ste_dma40.c | |
parent | 762eb33fdebed34d98943d85ee1425663d7cceaa (diff) |
dmaengine: ste_dma40: minor cosmetic fixes
This patch contains various non functional cosmetic fixes.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r-- | drivers/dma/ste_dma40.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index ff21dcbd8208..623779e580c3 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -1609,13 +1609,11 @@ static void dma_tasklet(unsigned long data) | |||
1609 | if (async_tx_test_ack(&d40d->txd)) { | 1609 | if (async_tx_test_ack(&d40d->txd)) { |
1610 | d40_desc_remove(d40d); | 1610 | d40_desc_remove(d40d); |
1611 | d40_desc_free(d40c, d40d); | 1611 | d40_desc_free(d40c, d40d); |
1612 | } else { | 1612 | } else if (!d40d->is_in_client_list) { |
1613 | if (!d40d->is_in_client_list) { | 1613 | d40_desc_remove(d40d); |
1614 | d40_desc_remove(d40d); | 1614 | d40_lcla_free_all(d40c, d40d); |
1615 | d40_lcla_free_all(d40c, d40d); | 1615 | list_add_tail(&d40d->node, &d40c->client); |
1616 | list_add_tail(&d40d->node, &d40c->client); | 1616 | d40d->is_in_client_list = true; |
1617 | d40d->is_in_client_list = true; | ||
1618 | } | ||
1619 | } | 1617 | } |
1620 | } | 1618 | } |
1621 | 1619 | ||
@@ -2123,7 +2121,6 @@ _exit: | |||
2123 | 2121 | ||
2124 | } | 2122 | } |
2125 | 2123 | ||
2126 | |||
2127 | static u32 stedma40_residue(struct dma_chan *chan) | 2124 | static u32 stedma40_residue(struct dma_chan *chan) |
2128 | { | 2125 | { |
2129 | struct d40_chan *d40c = | 2126 | struct d40_chan *d40c = |
@@ -2199,7 +2196,6 @@ d40_prep_sg_phy(struct d40_chan *chan, struct d40_desc *desc, | |||
2199 | return ret < 0 ? ret : 0; | 2196 | return ret < 0 ? ret : 0; |
2200 | } | 2197 | } |
2201 | 2198 | ||
2202 | |||
2203 | static struct d40_desc * | 2199 | static struct d40_desc * |
2204 | d40_prep_desc(struct d40_chan *chan, struct scatterlist *sg, | 2200 | d40_prep_desc(struct d40_chan *chan, struct scatterlist *sg, |
2205 | unsigned int sg_len, unsigned long dma_flags) | 2201 | unsigned int sg_len, unsigned long dma_flags) |
@@ -2225,7 +2221,6 @@ d40_prep_desc(struct d40_chan *chan, struct scatterlist *sg, | |||
2225 | goto err; | 2221 | goto err; |
2226 | } | 2222 | } |
2227 | 2223 | ||
2228 | |||
2229 | desc->lli_current = 0; | 2224 | desc->lli_current = 0; |
2230 | desc->txd.flags = dma_flags; | 2225 | desc->txd.flags = dma_flags; |
2231 | desc->txd.tx_submit = d40_tx_submit; | 2226 | desc->txd.tx_submit = d40_tx_submit; |
@@ -2274,7 +2269,6 @@ d40_prep_sg(struct dma_chan *dchan, struct scatterlist *sg_src, | |||
2274 | return NULL; | 2269 | return NULL; |
2275 | } | 2270 | } |
2276 | 2271 | ||
2277 | |||
2278 | spin_lock_irqsave(&chan->lock, flags); | 2272 | spin_lock_irqsave(&chan->lock, flags); |
2279 | 2273 | ||
2280 | desc = d40_prep_desc(chan, sg_src, sg_len, dma_flags); | 2274 | desc = d40_prep_desc(chan, sg_src, sg_len, dma_flags); |
@@ -2432,11 +2426,11 @@ static int d40_alloc_chan_resources(struct dma_chan *chan) | |||
2432 | 2426 | ||
2433 | if (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM) | 2427 | if (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM) |
2434 | d40c->lcpa = d40c->base->lcpa_base + | 2428 | d40c->lcpa = d40c->base->lcpa_base + |
2435 | d40c->dma_cfg.src_dev_type * D40_LCPA_CHAN_SIZE; | 2429 | d40c->dma_cfg.src_dev_type * D40_LCPA_CHAN_SIZE; |
2436 | else | 2430 | else |
2437 | d40c->lcpa = d40c->base->lcpa_base + | 2431 | d40c->lcpa = d40c->base->lcpa_base + |
2438 | d40c->dma_cfg.dst_dev_type * | 2432 | d40c->dma_cfg.dst_dev_type * |
2439 | D40_LCPA_CHAN_SIZE + D40_LCPA_CHAN_DST_DELTA; | 2433 | D40_LCPA_CHAN_SIZE + D40_LCPA_CHAN_DST_DELTA; |
2440 | } | 2434 | } |
2441 | 2435 | ||
2442 | dev_dbg(chan2dev(d40c), "allocated %s channel (phy %d%s)\n", | 2436 | dev_dbg(chan2dev(d40c), "allocated %s channel (phy %d%s)\n", |
@@ -2471,7 +2465,6 @@ static void d40_free_chan_resources(struct dma_chan *chan) | |||
2471 | return; | 2465 | return; |
2472 | } | 2466 | } |
2473 | 2467 | ||
2474 | |||
2475 | spin_lock_irqsave(&d40c->lock, flags); | 2468 | spin_lock_irqsave(&d40c->lock, flags); |
2476 | 2469 | ||
2477 | err = d40_free_dma(d40c); | 2470 | err = d40_free_dma(d40c); |
@@ -2514,12 +2507,10 @@ d40_prep_memcpy_sg(struct dma_chan *chan, | |||
2514 | return d40_prep_sg(chan, src_sg, dst_sg, src_nents, DMA_NONE, dma_flags); | 2507 | return d40_prep_sg(chan, src_sg, dst_sg, src_nents, DMA_NONE, dma_flags); |
2515 | } | 2508 | } |
2516 | 2509 | ||
2517 | static struct dma_async_tx_descriptor *d40_prep_slave_sg(struct dma_chan *chan, | 2510 | static struct dma_async_tx_descriptor * |
2518 | struct scatterlist *sgl, | 2511 | d40_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, |
2519 | unsigned int sg_len, | 2512 | unsigned int sg_len, enum dma_transfer_direction direction, |
2520 | enum dma_transfer_direction direction, | 2513 | unsigned long dma_flags, void *context) |
2521 | unsigned long dma_flags, | ||
2522 | void *context) | ||
2523 | { | 2514 | { |
2524 | if (direction != DMA_DEV_TO_MEM && direction != DMA_MEM_TO_DEV) | 2515 | if (direction != DMA_DEV_TO_MEM && direction != DMA_MEM_TO_DEV) |
2525 | return NULL; | 2516 | return NULL; |