From: Vitaly W. <vw...@ru...> - 2005-11-29 18:25:57
|
David Brownell wrote: >>You need to create the semaphore to protect >>the global 'buf', so if you have two controllers on the same board, you >>would not perform two simultaneous transfers with these controllers, >>right ? >> >> > >Yes, there IS a semaphore: > >+int spi_write_then_read(...) >+{ >+ static DECLARE_MUTEX(lock); >+ ... >+ down(&lock); >+ ... >+ up(&lock); >+ return status; >+} > > > So spi_write_then_read() can't ever be called from an interrupt context, right? Vitaly |