Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310297
b: refs/heads/master
c: f3fb3bb
h: refs/heads/master
i:
  310295: 4456bc3
v: v3
  • Loading branch information
Grazvydas Ignotas authored and Tomi Valkeinen committed Apr 23, 2012
1 parent c221e21 commit d745052
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c83af49ca83ebf521f9360baaca3718bb5d303e
refs/heads/master: f3fb3bbc7f71d573be40213af4a90751a81b2379
13 changes: 7 additions & 6 deletions trunk/drivers/video/omap2/omapfb/omapfb-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
down_write_nested(&rg->lock, rg->id);
atomic_inc(&rg->lock_count);

if (rg->size == size && rg->type == mi->type)
goto out;

if (atomic_read(&rg->map_count)) {
r = -EBUSY;
goto out;
Expand All @@ -247,12 +250,10 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
}
}

if (rg->size != size || rg->type != mi->type) {
r = omapfb_realloc_fbmem(fbi, size, mi->type);
if (r) {
dev_err(fbdev->dev, "realloc fbmem failed\n");
goto out;
}
r = omapfb_realloc_fbmem(fbi, size, mi->type);
if (r) {
dev_err(fbdev->dev, "realloc fbmem failed\n");
goto out;
}

out:
Expand Down

0 comments on commit d745052

Please sign in to comment.