]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
spi/atmel: Annotate lock/unlock functions
authorMark Brown <broonie@linaro.org>
Sun, 28 Jul 2013 13:32:27 +0000 (14:32 +0100)
committerMark Brown <broonie@linaro.org>
Sun, 28 Jul 2013 18:15:52 +0000 (19:15 +0100)
Let checkers like sparse know that the locking imbalances are intentional
in these functions.

Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-atmel.c

index 4c6c455685c2c34b0aa089c08c38a79a129af364..4e406930fa52e83fdfec8f11293aff1b5c9a0396 100644 (file)
@@ -360,12 +360,12 @@ static void cs_deactivate(struct atmel_spi *as, struct spi_device *spi)
                gpio_set_value(asd->npcs_pin, !active);
 }
 
-static void atmel_spi_lock(struct atmel_spi *as)
+static void atmel_spi_lock(struct atmel_spi *as) __acquires(&as->lock)
 {
        spin_lock_irqsave(&as->lock, as->flags);
 }
 
-static void atmel_spi_unlock(struct atmel_spi *as)
+static void atmel_spi_unlock(struct atmel_spi *as) __releases(&as->lock)
 {
        spin_unlock_irqrestore(&as->lock, as->flags);
 }