imx-drm: imx-tve: Provide __acquires/__releases annotation
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 16 Jul 2013 05:16:14 +0000 (02:16 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 20:33:14 +0000 (13:33 -0700)
Fix the following sparse warnings:

drivers/staging/imx-drm/imx-tve.c:133:13: warning: context imbalance in 'tve_lock' - wrong count at exit
drivers/staging/imx-drm/imx-tve.c:139:13: warning: context imbalance in 'tve_unlock' - unexpected unlock

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/imx-tve.c

index a56797d88edcdc85056dfed0b83f31811ed24cf4..0a1c6ab76344115d2a5c609495f8197c3a247fb0 100644 (file)
@@ -131,12 +131,14 @@ struct imx_tve {
 };
 
 static void tve_lock(void *__tve)
+__acquires(&tve->lock)
 {
        struct imx_tve *tve = __tve;
        spin_lock(&tve->lock);
 }
 
 static void tve_unlock(void *__tve)
+__releases(&tve->lock)
 {
        struct imx_tve *tve = __tve;
        spin_unlock(&tve->lock);