ASoC: msm: q6dspv2: use correct variable type to store ION buff size

The size of the physical memory allocated for ION buffers
are of type size_t. Change updates the type of variables
sent to ION drivers to size_t to avoid any mismatch.

Change-Id: I3d33ed922b979652c64027e6f1c6f0a8ed4850a3
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
This commit is contained in:
Banajit Goswami 2016-11-03 19:18:07 -07:00
parent 758693b4a6
commit b003c8d540
2 changed files with 7 additions and 5 deletions

View file

@ -3013,7 +3013,8 @@ int q6asm_set_shared_circ_buff(struct audio_client *ac,
int dir) int dir)
{ {
struct audio_buffer *buf_circ; struct audio_buffer *buf_circ;
int bytes_to_alloc, rc, len; int bytes_to_alloc, rc;
size_t len;
buf_circ = kzalloc(sizeof(struct audio_buffer), GFP_KERNEL); buf_circ = kzalloc(sizeof(struct audio_buffer), GFP_KERNEL);
@ -3032,7 +3033,7 @@ int q6asm_set_shared_circ_buff(struct audio_client *ac,
rc = msm_audio_ion_alloc("audio_client", &buf_circ->client, rc = msm_audio_ion_alloc("audio_client", &buf_circ->client,
&buf_circ->handle, bytes_to_alloc, &buf_circ->handle, bytes_to_alloc,
(ion_phys_addr_t *)&buf_circ->phys, (ion_phys_addr_t *)&buf_circ->phys,
(size_t *)&len, &buf_circ->data); &len, &buf_circ->data);
if (rc) { if (rc) {
pr_err("%s: Audio ION alloc is failed, rc = %d\n", __func__, pr_err("%s: Audio ION alloc is failed, rc = %d\n", __func__,
@ -3074,7 +3075,8 @@ int q6asm_set_shared_pos_buff(struct audio_client *ac,
int dir) int dir)
{ {
struct audio_buffer *buf_pos = &ac->shared_pos_buf; struct audio_buffer *buf_pos = &ac->shared_pos_buf;
int len, rc; int rc;
size_t len;
int bytes_to_alloc = sizeof(struct asm_shared_position_buffer); int bytes_to_alloc = sizeof(struct asm_shared_position_buffer);
mutex_lock(&ac->cmd_lock); mutex_lock(&ac->cmd_lock);
@ -3083,7 +3085,7 @@ int q6asm_set_shared_pos_buff(struct audio_client *ac,
rc = msm_audio_ion_alloc("audio_client", &buf_pos->client, rc = msm_audio_ion_alloc("audio_client", &buf_pos->client,
&buf_pos->handle, bytes_to_alloc, &buf_pos->handle, bytes_to_alloc,
(ion_phys_addr_t *)&buf_pos->phys, (size_t *)&len, (ion_phys_addr_t *)&buf_pos->phys, &len,
&buf_pos->data); &buf_pos->data);
if (rc) { if (rc) {

View file

@ -142,7 +142,7 @@ struct share_mem_buf {
struct mem_map_table { struct mem_map_table {
dma_addr_t phys; dma_addr_t phys;
void *data; void *data;
uint32_t size; /* size of buffer */ size_t size; /* size of buffer */
struct ion_handle *handle; struct ion_handle *handle;
struct ion_client *client; struct ion_client *client;
}; };