Skip to content

Commit

Permalink
spi/atmel: Annotate lock/unlock functions
Browse files Browse the repository at this point in the history
Let checkers like sparse know that the locking imbalances are intentional
in these functions.

Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
broonie committed Jul 28, 2013
1 parent dfec4a6 commit 6c07ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6c07ef2

Please sign in to comment.