Hi Sylvain,

On Mon, Mar 15, 2010 at 10:13:52AM +0000, Centelles, Sylvain wrote:
> I'm currently working on a spi driver for Intel platform, and when reading 
> the various other spi drivers available in the kernel, I saw the msg->status 
> was often updated (EINPROGRESS for example), but could not figure out who 
> checks this status. I would have thought it would be needed to prevent 
> concurrent access for example, but I didn't see anything in the core, nore 
> in any driver. If it's not needed, then I would not like to carry some 
> useless status updates in the driver I'm currently working on.
> Maybe I missed something... So if someone can please give some info on this, 
> it would be great!

See the spi_sync() function in drivers/spi/spi.c. Following is a snippet from 
this function:

        if (status == 0) {
                wait_for_completion(&done);
                status = message->status;
        }
        message->context = NULL;
        return status;

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to