diff options
author | Ville Syrjälä <ville.syrjala@nokia.com> | 2010-03-17 21:28:50 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-08-03 15:18:46 +0300 |
commit | 1ceafc00910439c8e5450fae189b69427725992c (patch) | |
tree | 5b98fb03b1885dc64b335965bd73686b818e368c /drivers/video/omap2/omapfb/omapfb-ioctl.c | |
parent | 3d84b65aa63833a2ac07b1cc626984a1e1485fed (diff) | |
download | lwn-1ceafc00910439c8e5450fae189b69427725992c.tar.gz lwn-1ceafc00910439c8e5450fae189b69427725992c.zip |
OMAP: DSS2: OMAPFB: Add some locking debug checks
Trigger WARN_ON() messages from various places in the code in case the
memory region is not currently locked.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb-ioctl.c')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c index 7975a99c33f9..d1f56d37405f 100644 --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c @@ -222,6 +222,7 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) rg = ofbi->region; down_write_nested(&rg->lock, rg->id); + atomic_inc(&rg->lock_count); if (atomic_read(&rg->map_count)) { r = -EBUSY; @@ -252,6 +253,7 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) } out: + atomic_dec(&rg->lock_count); up_write(&rg->lock); return r; |