davinci: edma: fix coding style issue related to usage of braces
In the edma driver, there are couple of instances where braces are used for a single statement 'if' construct. There are other instances where 'else' part of the if-else construct does not use braces even if the 'if' part is a multi-line statement. This patch fixes both. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
This commit is contained in:
committed by
Kevin Hilman
parent
3f68b98a75
commit
243bc65447
@ -310,10 +310,9 @@ setup_dma_interrupt(unsigned lch,
|
|||||||
ctlr = EDMA_CTLR(lch);
|
ctlr = EDMA_CTLR(lch);
|
||||||
lch = EDMA_CHAN_SLOT(lch);
|
lch = EDMA_CHAN_SLOT(lch);
|
||||||
|
|
||||||
if (!callback) {
|
if (!callback)
|
||||||
edma_shadow0_write_array(ctlr, SH_IECR, lch >> 5,
|
edma_shadow0_write_array(ctlr, SH_IECR, lch >> 5,
|
||||||
(1 << (lch & 0x1f)));
|
(1 << (lch & 0x1f)));
|
||||||
}
|
|
||||||
|
|
||||||
edma_cc[ctlr]->intr_data[lch].callback = callback;
|
edma_cc[ctlr]->intr_data[lch].callback = callback;
|
||||||
edma_cc[ctlr]->intr_data[lch].data = data;
|
edma_cc[ctlr]->intr_data[lch].data = data;
|
||||||
@ -376,14 +375,13 @@ static irqreturn_t dma_irq_handler(int irq, void *data)
|
|||||||
/* Clear the corresponding IPR bits */
|
/* Clear the corresponding IPR bits */
|
||||||
edma_shadow0_write_array(ctlr, SH_ICR, j,
|
edma_shadow0_write_array(ctlr, SH_ICR, j,
|
||||||
(1 << i));
|
(1 << i));
|
||||||
if (edma_cc[ctlr]->intr_data[k].callback) {
|
if (edma_cc[ctlr]->intr_data[k].callback)
|
||||||
edma_cc[ctlr]->intr_data[k].callback(
|
edma_cc[ctlr]->intr_data[k].callback(
|
||||||
k, DMA_COMPLETE,
|
k, DMA_COMPLETE,
|
||||||
edma_cc[ctlr]->intr_data[k].
|
edma_cc[ctlr]->intr_data[k].
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
cnt++;
|
cnt++;
|
||||||
if (cnt > 10)
|
if (cnt > 10)
|
||||||
break;
|
break;
|
||||||
@ -473,9 +471,8 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data)
|
|||||||
if ((edma_read_array(ctlr, EDMA_EMR, 0) == 0)
|
if ((edma_read_array(ctlr, EDMA_EMR, 0) == 0)
|
||||||
&& (edma_read_array(ctlr, EDMA_EMR, 1) == 0)
|
&& (edma_read_array(ctlr, EDMA_EMR, 1) == 0)
|
||||||
&& (edma_read(ctlr, EDMA_QEMR) == 0)
|
&& (edma_read(ctlr, EDMA_QEMR) == 0)
|
||||||
&& (edma_read(ctlr, EDMA_CCERR) == 0)) {
|
&& (edma_read(ctlr, EDMA_CCERR) == 0))
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
cnt++;
|
cnt++;
|
||||||
if (cnt > 10)
|
if (cnt > 10)
|
||||||
break;
|
break;
|
||||||
@ -531,10 +528,11 @@ static int reserve_contiguous_slots(int ctlr, unsigned int id,
|
|||||||
if (id == EDMA_CONT_PARAMS_FIXED_EXACT) {
|
if (id == EDMA_CONT_PARAMS_FIXED_EXACT) {
|
||||||
stop_slot = i;
|
stop_slot = i;
|
||||||
break;
|
break;
|
||||||
} else
|
} else {
|
||||||
count = num_slots;
|
count = num_slots;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We have to clear any bits that we set
|
* We have to clear any bits that we set
|
||||||
@ -1402,8 +1400,9 @@ static int __init edma_probe(struct platform_device *pdev)
|
|||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
} else
|
} else {
|
||||||
found = 1;
|
found = 1;
|
||||||
|
}
|
||||||
|
|
||||||
len[j] = resource_size(r[j]);
|
len[j] = resource_size(r[j]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user