diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 00:09:23 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 00:38:56 -0400 |
commit | dbe3039e64b1dd4cf26f782d45b524f85b444ad4 (patch) | |
tree | 4c23d00bf2a357691c986276988e571cb5968085 | |
parent | 5e6f6aa1c243fafeb2648cf4ebd5abd99ab2531b (diff) |
memblock/arm: Use memblock_region_is_memory() for omap fb
Instead of the deprecated memblock_find()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/arm/plat-omap/fb.c | 6 | ||||
-rw-r--r-- | drivers/video/omap2/vram.c | 8 |
2 files changed, 3 insertions, 11 deletions
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 05bf2282740..441af2bdfd1 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, | |||
173 | 173 | ||
174 | static int valid_sdram(unsigned long addr, unsigned long size) | 174 | static int valid_sdram(unsigned long addr, unsigned long size) |
175 | { | 175 | { |
176 | struct memblock_region res; | 176 | return memblock_region_is_memory(addr, size); |
177 | |||
178 | res.base = addr; | ||
179 | res.size = size; | ||
180 | return !memblock_find(&res) && res.base == addr && res.size == size; | ||
181 | } | 177 | } |
182 | 178 | ||
183 | static int reserve_sdram(unsigned long addr, unsigned long size) | 179 | 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 0f2532bf0f0..34514a899d1 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) | |||
554 | size = PAGE_ALIGN(size); | 554 | size = PAGE_ALIGN(size); |
555 | 555 | ||
556 | if (paddr) { | 556 | if (paddr) { |
557 | struct memblock_region res; | 557 | if ((paddr & ~PAGE_MASK) || |
558 | 558 | !memblock_region_is_memory(paddr, size)) { | |
559 | res.base = paddr; | ||
560 | res.size = size; | ||
561 | if ((paddr & ~PAGE_MASK) || memblock_find(&res) || | ||
562 | res.base != paddr || res.size != size) { | ||
563 | pr_err("Illegal SDRAM region for VRAM\n"); | 559 | pr_err("Illegal SDRAM region for VRAM\n"); |
564 | return; | 560 | return; |
565 | } | 561 | } |