These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / media / pci / mantis / mantis_dma.c
index 566c407..2ce310b 100644 (file)
@@ -130,21 +130,20 @@ err:
 
 int mantis_dma_init(struct mantis_pci *mantis)
 {
-       int err = 0;
+       int err;
 
        dprintk(MANTIS_DEBUG, 1, "Mantis DMA init");
-       if (mantis_alloc_buffers(mantis) < 0) {
+       err = mantis_alloc_buffers(mantis);
+       if (err < 0) {
                dprintk(MANTIS_ERROR, 1, "Error allocating DMA buffer");
 
                /* Stop RISC Engine */
                mmwrite(0, MANTIS_DMA_CTL);
 
-               goto err;
+               return err;
        }
 
        return 0;
-err:
-       return err;
 }
 EXPORT_SYMBOL_GPL(mantis_dma_init);
 
@@ -190,7 +189,7 @@ void mantis_dma_start(struct mantis_pci *mantis)
        mmwrite(0, MANTIS_DMA_CTL);
        mantis->last_block = mantis->busy_block = 0;
 
-       mmwrite(mmread(MANTIS_INT_MASK) | MANTIS_INT_RISCI, MANTIS_INT_MASK);
+       mantis_unmask_ints(mantis, MANTIS_INT_RISCI);
 
        mmwrite(MANTIS_FIFO_EN | MANTIS_DCAP_EN
                               | MANTIS_RISC_EN, MANTIS_DMA_CTL);
@@ -209,8 +208,7 @@ void mantis_dma_stop(struct mantis_pci *mantis)
 
        mmwrite(mmread(MANTIS_INT_STAT), MANTIS_INT_STAT);
 
-       mmwrite(mmread(MANTIS_INT_MASK) & ~(MANTIS_INT_RISCI |
-                                           MANTIS_INT_RISCEN), MANTIS_INT_MASK);
+       mantis_mask_ints(mantis, MANTIS_INT_RISCI | MANTIS_INT_RISCEN);
 }