On Thursday 14 August 2008, Andrew Morton wrote:
> @@ -219,8 +219,6 @@ struct spi_device *spi_alloc_device(stru
> }
> EXPORT_SYMBOL_GPL(spi_alloc_device);
>
> -static DEFINE_MUTEX(spi_add_lock);
> -
> /**
> * spi_add_device - Add spi_device allocated with spi_alloc_device
> * @spi: spi_device to register
> @@ -232,6 +230,7 @@ static DEFINE_MUTEX(spi_add_lock);
> */
> int spi_add_device(struct spi_device *spi)
> {
> + static DEFINE_MUTEX(spi_add_lock);
> struct device *dev = spi->master->dev.parent;
> int status;
>
> _
>
>
> OK?
Sure. You're right, that is indeed neater. Plus, if no Linux FAQ
currently says so, minimizing lock scope is a Very Good Thing.
- Dave
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general