From: Frank Mori Hess Date: Thu, 9 Aug 2007 12:58:26 +0000 (+0000) Subject: Made mite_done() update done status by reading status register. X-Git-Tag: r0_7_75~54 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=107e8db936c421ebb642d8455275c6057c6df01f;p=comedi.git Made mite_done() update done status by reading status register. --- diff --git a/comedi/drivers/mite.c b/comedi/drivers/mite.c index 451f6d11..0efb7d88 100644 --- a/comedi/drivers/mite.c +++ b/comedi/drivers/mite.c @@ -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); diff --git a/comedi/drivers/mite.h b/comedi/drivers/mite.h index 07d9a3e0..5c28e502 100644 --- a/comedi/drivers/mite.h +++ b/comedi/drivers/mite.h @@ -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);