*/
return 0; /* ignore don't needed firmare. */
}
- mgr = kmalloc(sizeof(struct chip_vdec_clk_s), GFP_KERNEL);
+ mgr = vzalloc(sizeof(struct chip_vdec_clk_s));
if (!mgr)
return -ENOMEM;
*mgr = *t_mgr;
*/
if (mgr->clock_init) {
if (mgr->clock_init()) {
- kfree(mgr);
+ vfree(mgr);
return -ENOMEM;
}
}
int unregister_vdec_clk_mgr(enum vdec_type_e vdec_type)
{
- kfree(get_current_vdec_chip()->clk_mgr[vdec_type]);
+ vfree(get_current_vdec_chip()->clk_mgr[vdec_type]);
return 0;
}
*/
return 0; /* ignore don't needed this setting . */
}
- p_setting = kmalloc(size, GFP_KERNEL);
+ p_setting = vzalloc(size);
if (!p_setting)
return -ENOMEM;
memcpy(p_setting, setting, size);
int unregister_vdec_clk_setting(void)
{
- kfree(get_current_vdec_chip()->clk_setting_array);
+ vfree(get_current_vdec_chip()->clk_setting_array);
return 0;
}
return -1;
}
- hw->sei_data_buf = kmalloc(SEI_DATA_SIZE, GFP_KERNEL);
+ hw->sei_data_buf = vzalloc(SEI_DATA_SIZE);
if (hw->sei_data_buf == NULL) {
pr_err("%s: failed to alloc sei itu data buffer\n",
__func__);
return -1;
}
- hw->sei_itu_data_buf = kmalloc(SEI_ITU_DATA_SIZE, GFP_KERNEL);
+ hw->sei_itu_data_buf = vzalloc(SEI_ITU_DATA_SIZE);
if (hw->sei_itu_data_buf == NULL) {
pr_err("%s: failed to alloc sei itu data buffer\n",
__func__);
hw->prefix_aux_size + hw->suffix_aux_size, hw->aux_addr,
hw->aux_phy_addr);
hw->aux_addr = NULL;
- kfree(hw->sei_data_buf);
+ vfree(hw->sei_data_buf);
hw->sei_data_buf = NULL;
return -1;
}
if (NULL == hw->sei_user_data_buffer) {
- hw->sei_user_data_buffer = kmalloc(USER_DATA_SIZE,
- GFP_KERNEL);
+ hw->sei_user_data_buffer = vzalloc(USER_DATA_SIZE);
if (!hw->sei_user_data_buffer) {
pr_info("%s: Can not allocate sei_data_buffer\n",
__func__);
hw->prefix_aux_size + hw->suffix_aux_size, hw->aux_addr,
hw->aux_phy_addr);
hw->aux_addr = NULL;
- kfree(hw->sei_data_buf);
+ vfree(hw->sei_data_buf);
hw->sei_data_buf = NULL;
- kfree(hw->sei_itu_data_buf);
+ vfree(hw->sei_itu_data_buf);
hw->sei_itu_data_buf = NULL;
return -1;
hw->aux_addr = NULL;
}
if (hw->sei_data_buf != NULL) {
- kfree(hw->sei_data_buf);
+ vfree(hw->sei_data_buf);
hw->sei_data_buf = NULL;
}
if (hw->sei_itu_data_buf != NULL) {
- kfree(hw->sei_itu_data_buf);
+ vfree(hw->sei_itu_data_buf);
hw->sei_itu_data_buf = NULL;
}
if (hw->sei_user_data_buffer != NULL) {
- kfree(hw->sei_user_data_buffer);
+ vfree(hw->sei_user_data_buffer);
hw->sei_user_data_buffer = NULL;
}
/* amvdec_disable(); */
static int vmh264_init_userdata_dump(void)
{
- user_data_buf = kmalloc(MAX_USER_DATA_SIZE, GFP_KERNEL);
+ user_data_buf = vzalloc(MAX_USER_DATA_SIZE);
if (user_data_buf)
return 1;
else
{
if (user_data_buf) {
show_user_data_buf();
- kfree(user_data_buf);
+ vfree(user_data_buf);
user_data_buf = NULL;
}
}
int i;
char *pbuf = buf;
ssize_t ret;
- u16 *trace_buf = kmalloc(debug_trace_num * 2, GFP_KERNEL);
+ u16 *trace_buf = vzalloc(debug_trace_num * 2);
if (!trace_buf) {
pbuf += sprintf(pbuf, "No Memory bug\n");
mutex_lock(&vdec_mutex);
if (!vdec_on(VDEC_1)) {
mutex_unlock(&vdec_mutex);
- kfree(trace_buf);
+ vfree(trace_buf);
pbuf += sprintf(pbuf, "amrisc is power off\n");
ret = pbuf - buf;
return ret;
}
while (i < debug_trace_num)
;
- kfree(trace_buf);
+ vfree(trace_buf);
pbuf += sprintf(pbuf, "\n");
ret = pbuf - buf;
return ret;