mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 09:31:50 +00:00
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>
This commit is contained in:
parent
5e6f6aa1c2
commit
dbe3039e64
@ -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)
|
static int valid_sdram(unsigned long addr, unsigned long size)
|
||||||
{
|
{
|
||||||
struct memblock_region res;
|
return memblock_region_is_memory(addr, size);
|
||||||
|
|
||||||
res.base = addr;
|
|
||||||
res.size = size;
|
|
||||||
return !memblock_find(&res) && res.base == addr && res.size == size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int reserve_sdram(unsigned long addr, unsigned long size)
|
static int reserve_sdram(unsigned long addr, unsigned long size)
|
||||||
|
@ -554,12 +554,8 @@ void __init omap_vram_reserve_sdram_memblock(void)
|
|||||||
size = PAGE_ALIGN(size);
|
size = PAGE_ALIGN(size);
|
||||||
|
|
||||||
if (paddr) {
|
if (paddr) {
|
||||||
struct memblock_region res;
|
if ((paddr & ~PAGE_MASK) ||
|
||||||
|
!memblock_region_is_memory(paddr, size)) {
|
||||||
res.base = paddr;
|
|
||||||
res.size = size;
|
|
||||||
if ((paddr & ~PAGE_MASK) || memblock_find(&res) ||
|
|
||||||
res.base != paddr || res.size != size) {
|
|
||||||
pr_err("Illegal SDRAM region for VRAM\n");
|
pr_err("Illegal SDRAM region for VRAM\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user