diff options
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb-ioctl.c')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-ioctl.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c index 69bcbfca47f6..3a10146dc120 100644 --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c | |||
@@ -198,13 +198,7 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) | |||
198 | 198 | ||
199 | rg = ofbi->region; | 199 | rg = ofbi->region; |
200 | 200 | ||
201 | /* FIXME probably should be a rwsem ... */ | 201 | down_write(&rg->lock); |
202 | mutex_lock(&rg->mtx); | ||
203 | while (rg->ref) { | ||
204 | mutex_unlock(&rg->mtx); | ||
205 | schedule(); | ||
206 | mutex_lock(&rg->mtx); | ||
207 | } | ||
208 | 202 | ||
209 | if (atomic_read(&rg->map_count)) { | 203 | if (atomic_read(&rg->map_count)) { |
210 | r = -EBUSY; | 204 | r = -EBUSY; |
@@ -235,7 +229,7 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) | |||
235 | } | 229 | } |
236 | 230 | ||
237 | out: | 231 | out: |
238 | mutex_unlock(&rg->mtx); | 232 | up_write(&rg->lock); |
239 | 233 | ||
240 | return r; | 234 | return r; |
241 | } | 235 | } |