From: Benjamin Herrenschmidt Date: Wed, 4 Aug 2010 04:09:23 +0000 (+1000) Subject: memblock/arm: Use memblock_region_is_memory() for omap fb X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dbe3039;p=linux-beck.git memblock/arm: Use memblock_region_is_memory() for omap fb Instead of the deprecated memblock_find() Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 05bf22827404..441af2bdfd15 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c @@ -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) diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c index 0f2532bf0f04..34514a899d13 100644 --- a/drivers/video/omap2/vram.c +++ b/drivers/video/omap2/vram.c @@ -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; }