Commit 89557642 authored by Russell King's avatar Russell King

ARM: iMX: visstrim_m10: use arm_memblock_steal

Use the provided function rather than re-coding this bit of code.
This also gets us protection against using these functions from
invalid contexts.
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Tested-by: default avatarJavier Martin <javier.martin@vista-silicon.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent c5dfdbe0
......@@ -32,12 +32,12 @@
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/leds.h>
#include <linux/memblock.h>
#include <media/soc_camera.h>
#include <sound/tlv320aic32x4.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <asm/memblock.h>
#include <asm/system.h>
#include <mach/common.h>
#include <mach/iomux-mx27.h>
......@@ -219,10 +219,8 @@ static void __init visstrim_camera_init(void)
static void __init visstrim_reserve(void)
{
/* reserve 4 MiB for mx2-camera */
mx2_camera_base = memblock_alloc(MX2_CAMERA_BUF_SIZE,
mx2_camera_base = memblock_steal(MX2_CAMERA_BUF_SIZE,
MX2_CAMERA_BUF_SIZE);
memblock_free(mx2_camera_base, MX2_CAMERA_BUF_SIZE);
memblock_remove(mx2_camera_base, MX2_CAMERA_BUF_SIZE);
}
/* GPIOs used as events for applications */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment