Re: [PATCH 41/48] staging: comedi: pcl812: use comedi_timeout()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 07, 2014 at 04:14:01PM +0000, Hartley Sweeten wrote:
> On Friday, February 07, 2014 8:34 AM, Ian Abbott wrote:
> > On 2014-02-06 23:49, H Hartley Sweeten wrote:
> >> Use comedi_timeout() to wait for the analog input end-of-conversion.
> >>
> >> Combine the logic for the pcl812 and acl812 end-of-conversion in the
> >> helper function to simplify the driver.
> >>
> >> The interrupt routine also uses the timeout check to make sure data
> >> is actually available. Using NULL here for the 'insn' is safe since
> >> nothing uses it.
> >
> > I don't think you can rely on jiffies being updated in the interrupt 
> > routine.
> 
> From previous comments from Greg I assumed using jiffies for the
> timeout was ok in interrupt contexts, we just couldn't use cpu_relax().
> But, I could be wrong. Hopefully someone might be able to provide
> some more information on this.

Unless you are the timer interrupt, I'm pretty sure that jiffies is ok
to use in interrupt context.  But I could be totally wrong, it's been
years since I looked at that.  Try it and see!  :)

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux