Made mite_done() update done status by reading status register.
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 9 Aug 2007 12:58:26 +0000 (12:58 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 9 Aug 2007 12:58:26 +0000 (12:58 +0000)
comedi/drivers/mite.c
comedi/drivers/mite.h

index 451f6d11e8efed42c2eb4b5e81e09645cee9b392..0efb7d881c1e1fcaf5802e80e4ad4b3d5416db68 100644 (file)
@@ -599,12 +599,13 @@ unsigned mite_get_status(struct mite_channel *mite_chan)
        return status;
 }
 
-int mite_done(const struct mite_channel *mite_chan)
+int mite_done(struct mite_channel *mite_chan)
 {
        struct mite_struct *mite = mite_chan->mite;
        unsigned long flags;
        int done;
 
+       mite_get_status(mite_chan);
        comedi_spin_lock_irqsave(&mite->lock, flags);
        done = mite_chan->done;
        comedi_spin_unlock_irqrestore(&mite->lock, flags);
index 07d9a3e0ac304e4f1bd706275e6ea48988ab62a6..5c28e5025fd0cba56377543ea49c83f6d32f9c5b 100644 (file)
@@ -147,7 +147,7 @@ u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan);
 u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan);
 u32 mite_bytes_in_transit(struct mite_channel *mite_chan);
 unsigned mite_get_status(struct mite_channel *mite_chan);
-int mite_done(const struct mite_channel *mite_chan);
+int mite_done(struct mite_channel *mite_chan);
 
 #if 0
 unsigned long mite_ll_from_kvmem(struct mite_struct *mite,comedi_async *async,int len);