Now that we can use direct access to the system malloc() in sandbox, drop
the remaining uses of os_malloc().
The only one remaining now is for the RAM buffer, which we do want to be
at a known address, so this is intended.
Signed-off-by: Simon Glass <sjg@chromium.org>
#include <ec_commands.h>
#include <errno.h>
#include <hash.h>
#include <ec_commands.h>
#include <errno.h>
#include <hash.h>
#include <os.h>
#include <u-boot/sha256.h>
#include <spi.h>
#include <os.h>
#include <u-boot/sha256.h>
#include <spi.h>
#include <asm/state.h>
#include <asm/sdl.h>
#include <linux/input.h>
#include <asm/state.h>
#include <asm/sdl.h>
#include <linux/input.h>
prop = fdt_getprop(blob, node, "flash-data", &len);
if (prop) {
ec->flash_data_len = len;
prop = fdt_getprop(blob, node, "flash-data", &len);
if (prop) {
ec->flash_data_len = len;
- ec->flash_data = os_malloc(len);
+ ec->flash_data = malloc(len);
if (!ec->flash_data)
return -ENOMEM;
memcpy(ec->flash_data, prop, len);
if (!ec->flash_data)
return -ENOMEM;
memcpy(ec->flash_data, prop, len);
ec->flash_data_len != ec->ec_config.flash.length) {
printf("EC data length is %x, expected %x, discarding data\n",
ec->flash_data_len, ec->ec_config.flash.length);
ec->flash_data_len != ec->ec_config.flash.length) {
printf("EC data length is %x, expected %x, discarding data\n",
ec->flash_data_len, ec->ec_config.flash.length);
- os_free(ec->flash_data);
ec->flash_data = NULL;
}
/* Otherwise allocate the memory */
if (!ec->flash_data) {
ec->flash_data_len = ec->ec_config.flash.length;
ec->flash_data = NULL;
}
/* Otherwise allocate the memory */
if (!ec->flash_data) {
ec->flash_data_len = ec->ec_config.flash.length;
- ec->flash_data = os_malloc(ec->flash_data_len);
+ ec->flash_data = malloc(ec->flash_data_len);
if (!ec->flash_data)
return -ENOMEM;
}
if (!ec->flash_data)
return -ENOMEM;
}