projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5dc3fc
)
dmaengine: omap-dma: Simplify omap_dma_callback
author
Peter Ujfalusi
<peter.ujfalusi@ti.com>
Wed, 20 Jul 2016 08:50:28 +0000
(11:50 +0300)
committer
Vinod Koul
<vinod.koul@intel.com>
Wed, 10 Aug 2016 17:29:12 +0000
(22:59 +0530)
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>
drivers/dma/omap-dma.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/dma/omap-dma.c
b/drivers/dma/omap-dma.c
index 2fdeb02e81fc7f5951dc869817ba7e15713b720e..3c445942bd314635bb4b37695abc07381f8f18ab 100644
(file)
--- a/
drivers/dma/omap-dma.c
+++ b/
drivers/dma/omap-dma.c
@@
-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);