diff options
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 7975a99c33f..d1f56d37405 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) | |||
222 | rg = ofbi->region; | 222 | rg = ofbi->region; |
223 | 223 | ||
224 | down_write_nested(&rg->lock, rg->id); | 224 | down_write_nested(&rg->lock, rg->id); |
225 | atomic_inc(&rg->lock_count); | ||
225 | 226 | ||
226 | if (atomic_read(&rg->map_count)) { | 227 | if (atomic_read(&rg->map_count)) { |
227 | r = -EBUSY; | 228 | r = -EBUSY; |
@@ -252,6 +253,7 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) | |||
252 | } | 253 | } |
253 | 254 | ||
254 | out: | 255 | out: |
256 | atomic_dec(&rg->lock_count); | ||
255 | up_write(&rg->lock); | 257 | up_write(&rg->lock); |
256 | 258 | ||
257 | return r; | 259 | return r; |