Re: [PATCH v7 06/14] spi/spi-atmel: add flag to controller data for lock operations

Mark Brown
2013-04-01T13:46:17Z

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

On Tue, Mar 19, 2013 at 03:46:03PM +0800, Wenyou Yang wrote:

> +static void atmel_spi_lock(struct atmel_spi *as)
> +{
> + spin_lock_irqsave(&as->lock, as->flags);
> +}

Coding style.

> - spin_unlock(&as->lock);
> + atmel_spi_unlock(as);
> msg->complete(msg->context);
> - spin_lock(&as->lock);
> + atmel_spi_lock(as);

This replaces non-irqsave versions with irqsave versions of the lock.
Is this safe/correct? If it is I'd have expected some sort of mention
of it in the commit log.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]