Instead of the deprecated memblock_find()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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)
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;
}