regmap: Provide __acquires/__releases annotations
Fix the following sparse warnings: drivers/base/regmap/regmap.c:305:13: warning: context imbalance in 'regmap_lock_spinlock' - wrong count at exit drivers/base/regmap/regmap.c:314:13: warning: context imbalance in 'regmap_unlock_spinlock' - unexpected unlock Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
ad81f0545e
commit
b4519c71c4
1 changed files with 2 additions and 0 deletions
|
@ -303,6 +303,7 @@ static void regmap_unlock_mutex(void *__map)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void regmap_lock_spinlock(void *__map)
|
static void regmap_lock_spinlock(void *__map)
|
||||||
|
__acquires(&map->spinlock)
|
||||||
{
|
{
|
||||||
struct regmap *map = __map;
|
struct regmap *map = __map;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -312,6 +313,7 @@ static void regmap_lock_spinlock(void *__map)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void regmap_unlock_spinlock(void *__map)
|
static void regmap_unlock_spinlock(void *__map)
|
||||||
|
__releases(&map->spinlock)
|
||||||
{
|
{
|
||||||
struct regmap *map = __map;
|
struct regmap *map = __map;
|
||||||
spin_unlock_irqrestore(&map->spinlock, map->spinlock_flags);
|
spin_unlock_irqrestore(&map->spinlock, map->spinlock_flags);
|
||||||
|
|
Loading…
Add table
Reference in a new issue