Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218788
b: refs/heads/master
c: a2c15fa
h: refs/heads/master
v: v3
  • Loading branch information
Rabin Vincent authored and Dan Williams committed Oct 7, 2010
1 parent 7d3ebd2 commit d83b13e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6134c967c5b8b5986371de335fa4ec39de268bc
refs/heads/master: a2c15fa4c122558472f8041515072218c8652c7e
23 changes: 14 additions & 9 deletions trunk/drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,24 +419,29 @@ static void d40_desc_remove(struct d40_desc *d40d)

static struct d40_desc *d40_desc_get(struct d40_chan *d40c)
{
struct d40_desc *d;
struct d40_desc *_d;
struct d40_desc *desc = NULL;

if (!list_empty(&d40c->client)) {
struct d40_desc *d;
struct d40_desc *_d;

list_for_each_entry_safe(d, _d, &d40c->client, node)
if (async_tx_test_ack(&d->txd)) {
d40_pool_lli_free(d);
d40_desc_remove(d);
desc = d;
memset(desc, 0, sizeof(*desc));
break;
}
} else {
d = kmem_cache_alloc(d40c->base->desc_slab, GFP_NOWAIT);
if (d != NULL) {
memset(d, 0, sizeof(struct d40_desc));
INIT_LIST_HEAD(&d->node);
}
}
return d;

if (!desc)
desc = kmem_cache_zalloc(d40c->base->desc_slab, GFP_NOWAIT);

if (desc)
INIT_LIST_HEAD(&desc->node);

return desc;
}

static void d40_desc_free(struct d40_chan *d40c, struct d40_desc *d40d)
Expand Down

0 comments on commit d83b13e

Please sign in to comment.