Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[deliverable/linux.git] / drivers / dma / tegra20-apb-dma.c
index a8de08b8cbcef5619e9a11ce5872741c27809e32..6ab9eb98588a88514f64f4b1221d87da3ecc4721 100644 (file)
@@ -481,7 +481,7 @@ static void tegra_dma_configure_for_next(struct tegra_dma_channel *tdc,
         * load new configuration.
         */
        tegra_dma_pause(tdc, false);
-       status  = tdc_read(tdc, TEGRA_APBDMA_CHAN_STATUS);
+       status = tdc_read(tdc, TEGRA_APBDMA_CHAN_STATUS);
 
        /*
         * If interrupt is pending then do nothing as the ISR will handle
@@ -811,7 +811,7 @@ static enum dma_status tegra_dma_tx_status(struct dma_chan *dc,
        unsigned int residual;
 
        ret = dma_cookie_status(dc, cookie, txstate);
-       if (ret == DMA_COMPLETE || !txstate)
+       if (ret == DMA_COMPLETE)
                return ret;
 
        spin_lock_irqsave(&tdc->lock, flags);
@@ -837,7 +837,7 @@ static enum dma_status tegra_dma_tx_status(struct dma_chan *dc,
        dma_desc = NULL;
 
 found:
-       if (dma_desc) {
+       if (dma_desc && txstate) {
                residual = dma_desc->bytes_requested -
                           (dma_desc->bytes_transferred %
                            dma_desc->bytes_requested);
@@ -902,7 +902,6 @@ static int get_transfer_param(struct tegra_dma_channel *tdc,
        unsigned long *apb_seq, unsigned long *csr, unsigned int *burst_size,
        enum dma_slave_buswidth *slave_bw)
 {
-
        switch (direction) {
        case DMA_MEM_TO_DEV:
                *apb_addr = tdc->dma_sconfig.dst_addr;
@@ -945,8 +944,8 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_slave_sg(
 {
        struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
        struct tegra_dma_desc *dma_desc;
-       unsigned int        i;
-       struct scatterlist      *sg;
+       unsigned int i;
+       struct scatterlist *sg;
        unsigned long csr, ahb_seq, apb_ptr, apb_seq;
        struct list_head req_list;
        struct tegra_dma_sg_req  *sg_req = NULL;
@@ -1059,7 +1058,7 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_dma_cyclic(
 {
        struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
        struct tegra_dma_desc *dma_desc = NULL;
-       struct tegra_dma_sg_req  *sg_req = NULL;
+       struct tegra_dma_sg_req *sg_req = NULL;
        unsigned long csr, ahb_seq, apb_ptr, apb_seq;
        int len;
        size_t remain_len;
@@ -1201,7 +1200,6 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc)
 {
        struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
        struct tegra_dma *tdma = tdc->tdma;
-
        struct tegra_dma_desc *dma_desc;
        struct tegra_dma_sg_req *sg_req;
        struct list_head dma_desc_list;
@@ -1302,7 +1300,7 @@ static const struct tegra_dma_chip_data tegra148_dma_chip_data = {
 
 static int tegra_dma_probe(struct platform_device *pdev)
 {
-       struct resource *res;
+       struct resource *res;
        struct tegra_dma *tdma;
        int ret;
        int i;
This page took 0.034827 seconds and 5 git commands to generate.