Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b57ebe08 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Vinod Koul
Browse files

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: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent a5dc3fca
Loading
Loading
Loading
Loading
+6 −8
Original line number Original line Diff line number Diff line
@@ -445,15 +445,13 @@ static void omap_dma_callback(int ch, u16 status, void *data)
	spin_lock_irqsave(&c->vc.lock, flags);
	spin_lock_irqsave(&c->vc.lock, flags);
	d = c->desc;
	d = c->desc;
	if (d) {
	if (d) {
		if (!c->cyclic) {
		if (c->cyclic) {
			if (c->sgidx < d->sglen) {
			vchan_cyclic_callback(&d->vd);
				omap_dma_start_sg(c, d);
		} else if (c->sgidx == d->sglen) {
			} else {
			omap_dma_start_desc(c);
			omap_dma_start_desc(c);
			vchan_cookie_complete(&d->vd);
			vchan_cookie_complete(&d->vd);
			}
		} else {
		} else {
			vchan_cyclic_callback(&d->vd);
			omap_dma_start_sg(c, d);
		}
		}
	}
	}
	spin_unlock_irqrestore(&c->vc.lock, flags);
	spin_unlock_irqrestore(&c->vc.lock, flags);