Skip to content

Commit

Permalink
memblock/arm: Use memblock_region_is_memory() for omap fb
Browse files Browse the repository at this point in the history
Instead of the deprecated memblock_find()

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Herrenschmidt committed Aug 4, 2010
1 parent 5e6f6aa commit dbe3039
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
6 changes: 1 addition & 5 deletions arch/arm/plat-omap/fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,7 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,

static int valid_sdram(unsigned long addr, unsigned long size)
{
struct memblock_region res;

res.base = addr;
res.size = size;
return !memblock_find(&res) && res.base == addr && res.size == size;
return memblock_region_is_memory(addr, size);
}

static int reserve_sdram(unsigned long addr, unsigned long size)
Expand Down
8 changes: 2 additions & 6 deletions drivers/video/omap2/vram.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,12 +554,8 @@ void __init omap_vram_reserve_sdram_memblock(void)
size = PAGE_ALIGN(size);

if (paddr) {
struct memblock_region res;

res.base = paddr;
res.size = size;
if ((paddr & ~PAGE_MASK) || memblock_find(&res) ||
res.base != paddr || res.size != size) {
if ((paddr & ~PAGE_MASK) ||
!memblock_region_is_memory(paddr, size)) {
pr_err("Illegal SDRAM region for VRAM\n");
return;
}
Expand Down

0 comments on commit dbe3039

Please sign in to comment.