add clear_dma_ff() calls
authorFrank Mori Hess <fmhess@speakeasy.net>
Wed, 3 Sep 2003 20:08:16 +0000 (20:08 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Wed, 3 Sep 2003 20:08:16 +0000 (20:08 +0000)
comedi/drivers/dt282x.c

index 93e697d573f52903e08d8838f4f7453192875723..f5a971a857b93d1c7076801cb53ecc18860ec575 100644 (file)
@@ -386,7 +386,6 @@ static int dt282x_grab_dma(comedi_device *dev,int dma1,int dma2);
 static void dt282x_munge(comedi_device *dev,sampl_t *buf,
        unsigned int nbytes)
 {
-       comedi_async *async = dev->subdevices[0].async;
        unsigned int i;
        unsigned short mask=(1<<boardtype.adbits)-1;
        unsigned short sign=1<<(boardtype.adbits-1);
@@ -529,6 +528,7 @@ static int prep_ai_dma(comedi_device * dev,int chan,int n)
 
        set_dma_mode(dma_chan, DMA_MODE_READ);
        flags=claim_dma_lock();
+       clear_dma_ff(dma_chan);
        set_dma_addr(dma_chan, dma_ptr);
        set_dma_count(dma_chan, n);
        release_dma_lock(flags);
@@ -548,6 +548,7 @@ static int prep_ao_dma(comedi_device * dev,int chan,int n)
 
        set_dma_mode(dma_chan, DMA_MODE_WRITE);
        flags=claim_dma_lock();
+       clear_dma_ff(dma_chan);
        set_dma_addr(dma_chan, dma_ptr);
        set_dma_count(dma_chan, n );
        release_dma_lock(flags);