dmaengine: omap-dma: Simplify omap_dma_callback
Flatten the indentation level of the function which gives better view on the cases we handle here. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
a5dc3fcac4
commit
b57ebe080c
1 changed files with 6 additions and 8 deletions
|
@ -445,15 +445,13 @@ static void omap_dma_callback(int ch, u16 status, void *data)
|
|||
spin_lock_irqsave(&c->vc.lock, flags);
|
||||
d = c->desc;
|
||||
if (d) {
|
||||
if (!c->cyclic) {
|
||||
if (c->sgidx < d->sglen) {
|
||||
omap_dma_start_sg(c, d);
|
||||
} else {
|
||||
omap_dma_start_desc(c);
|
||||
vchan_cookie_complete(&d->vd);
|
||||
}
|
||||
} else {
|
||||
if (c->cyclic) {
|
||||
vchan_cyclic_callback(&d->vd);
|
||||
} else if (c->sgidx == d->sglen) {
|
||||
omap_dma_start_desc(c);
|
||||
vchan_cookie_complete(&d->vd);
|
||||
} else {
|
||||
omap_dma_start_sg(c, d);
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&c->vc.lock, flags);
|
||||
|
|
Loading…
Reference in a new issue